mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-10 23:07:12 -05:00
Merge pull request #2106 from knandersen/bugfix/2105
Fix #2105 by correctly accessing motor position from BoostMotor-class
This commit is contained in:
commit
3d74bbd823
1 changed files with 2 additions and 2 deletions
|
@ -1808,8 +1808,8 @@ class Scratch3BoostBlocks {
|
|||
log.warn('Asked for a motor position that doesnt exist!');
|
||||
return false;
|
||||
}
|
||||
if (portID && this.motor(portID)) {
|
||||
return MathUtil.wrapClamp(this.motor(portID).position, 0, 360);
|
||||
if (portID && this._peripheral.motor(portID)) {
|
||||
return MathUtil.wrapClamp(this._peripheral.motor(portID).position, 0, 360);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue