mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Merge pull request #2133 from evhan55/bugfix/2125
Prevent Boost turnOnForDegrees jittering on power set
This commit is contained in:
commit
e029b9e0e8
1 changed files with 0 additions and 10 deletions
|
@ -1787,11 +1787,6 @@ class Scratch3BoostBlocks {
|
|||
case BoostMotorState.ON_FOR_TIME:
|
||||
motor.turnOnFor(motor.pendingTimeoutStartTime + motor.pendingTimeoutDelay - Date.now());
|
||||
break;
|
||||
case BoostMotorState.ON_FOR_ROTATION: {
|
||||
const p = Math.abs(motor.pendingPositionDestination - motor.position);
|
||||
motor.turnOnForDegrees(p, Math.sign(p));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1838,11 +1833,6 @@ class Scratch3BoostBlocks {
|
|||
case BoostMotorState.ON_FOR_TIME:
|
||||
motor.turnOnFor(motor.pendingTimeoutStartTime + motor.pendingTimeoutDelay - Date.now());
|
||||
break;
|
||||
case BoostMotorState.ON_FOR_ROTATION: {
|
||||
const p = Math.abs(motor.pendingPositionDestination - motor.position);
|
||||
motor.turnOnForDegrees(p, Math.sign(p));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue