File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Source/CustomAvatar/Avatar Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -263,15 +263,6 @@ internal static void Solve(Arm arm, bool isLeft)
263
263
IEnumerable < CodeInstruction > Transpiler ( IEnumerable < CodeInstruction > instructions )
264
264
{
265
265
return new CodeMatcher ( instructions )
266
- // Add `+ yOA` after `Mathf.Atan2(sDirWorking.x, sDirWorking.z) * Mathf.Rad2Deg`
267
- . MatchForward ( true ,
268
- new CodeMatch ( i => i . Equals ( OpCodes . Ldc_R4 , Mathf . Rad2Deg ) ) ,
269
- new CodeMatch ( OpCodes . Mul ) )
270
- . ThrowIfInvalid ( "Initial yaw calculation not found" )
271
- . Advance ( 1 )
272
- . InsertAndAdvance (
273
- new CodeInstruction ( OpCodes . Ldloc_2 ) ,
274
- new CodeInstruction ( OpCodes . Add ) )
275
266
// Remove `yaw -= yOA`
276
267
. MatchForward ( false ,
277
268
new CodeMatch ( i => i . LoadsLocal ( 5 ) ) ,
@@ -284,11 +275,13 @@ IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instruction
284
275
. MatchForward ( false ,
285
276
new CodeMatch ( OpCodes . Ldloc_2 ) ,
286
277
new CodeMatch ( OpCodes . Sub ) )
278
+ . ThrowIfInvalid ( "`yawLimitMin - yOA` not found" )
287
279
. RemoveInstructions ( 2 )
288
280
// Remove `- yOA` from `yawLimitMax` in call to `DamperValue`
289
281
. MatchForward ( false ,
290
282
new CodeMatch ( OpCodes . Ldloc_2 ) ,
291
283
new CodeMatch ( OpCodes . Sub ) )
284
+ . ThrowIfInvalid ( "`yawLimitMax - yOA` not found" )
292
285
. RemoveInstructions ( 2 )
293
286
// Replace `shoulder.solverRotation * shoulder.axis` with `From(this, isLeft)`
294
287
. MatchForward ( false ,
You can’t perform that action at this time.
0 commit comments