animateMovement: correct even if moved to the same cell

This commit is contained in:
Zeno Rogue 2019-11-22 19:39:50 +01:00
parent d537b05fb3
commit 3139feb50c
1 changed files with 2 additions and 1 deletions

View File

@ -5035,8 +5035,9 @@ EX transmatrix iadj(const movei& m) {
EX void animateMovement(const movei& m, int layer) {
if(vid.mspeed >= 5) return; // no animations!
transmatrix T = iadj(m);
bool found_s = animations[layer].count(m.s);
animation& a = animations[layer][m.t];
if(animations[layer].count(m.s)) {
if(found_s) {
a = animations[layer][m.s];
a.wherenow = T * a.wherenow;
animations[layer].erase(m.s);