Skip to content

Commit 14bcd3f

Browse files
Merge branch 'fix-attempt-to-animate-frame-0' into 'master'
[FIX][SDK] Do not allow the drawer to attempt the impossible task of animating frame 0 See merge request codingame/game-engine!264
2 parents a56301a + 4480c95 commit 14bcd3f

File tree

1 file changed

+3
-2
lines changed
  • engine/core/src/main/resources/view/core

1 file changed

+3
-2
lines changed

engine/core/src/main/resources/view/core/Drawer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,12 +496,13 @@ export class Drawer {
496496

497497
checkSteppedToNextFrame (scope, selectedFrame, progress) {
498498
return this.checkStepped(scope, selectedFrame, progress) &&
499-
(scope.currentFrame === selectedFrame.previous || (scope.currentFrame === selectedFrame && scope.currentProgress !== progress))
499+
((scope.currentFrame === selectedFrame.previous && scope.currentFrame !== selectedFrame) || (scope.currentFrame === selectedFrame && scope.currentProgress !== progress))
500500
}
501501

502502
checkSteppedToPreviousFrame (scope, selectedFrame, progress) {
503503
return this.checkStepped(scope, selectedFrame, progress) &&
504-
scope.currentFrame.previous === selectedFrame
504+
scope.currentFrame.previous === selectedFrame &&
505+
scope.currentFrame !== selectedFrame
505506
}
506507

507508
initEndScene (scope, failure) {

0 commit comments

Comments
 (0)