RuneJS is a RuneScape game server written in TypeScript and JavaScript. The goal of the project is to create a comprehensive game engine, while also providing simple and easy to use content development systems and APIs.
GNU General Public License v3.0
238
stars
82
forks
source link
[BUG] Animations are cancelled after one tick #398
Describe the bug
Animations are cancelled after one tick of playing, they should continue to play to the end.
To Reproduce
Steps to reproduce the behavior:
Run an emote such as "Jump for joy", you will notice it doesn't complete
If you spam-click the animation button, the emote will complete
Expected behavior
The emote should run to its finish.
Additional context
I was able to fix this locally by going into player-sync-task.ts and changing the updateFlags.animation !== undefined checks to updateFlags.animation !== undefined && updateFlags.animation !== null.
The issue is that the "Reset animation" part is being called every tick, thus setting the animation back to -1.
Possibly we can just remove the undefined check entirely, and only check against null.
Describe the bug Animations are cancelled after one tick of playing, they should continue to play to the end.
To Reproduce Steps to reproduce the behavior:
Expected behavior The emote should run to its finish.
Additional context
I was able to fix this locally by going into
player-sync-task.ts
and changing theupdateFlags.animation !== undefined
checks toupdateFlags.animation !== undefined && updateFlags.animation !== null
.The issue is that the "Reset animation" part is being called every tick, thus setting the animation back to -1.
Possibly we can just remove the
undefined
check entirely, and only check againstnull
.