mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 01:20:37 +00:00
animateMovement: correct even if moved to the same cell
This commit is contained in:
parent
d537b05fb3
commit
3139feb50c
@ -5035,8 +5035,9 @@ EX transmatrix iadj(const movei& m) {
|
|||||||
EX void animateMovement(const movei& m, int layer) {
|
EX void animateMovement(const movei& m, int layer) {
|
||||||
if(vid.mspeed >= 5) return; // no animations!
|
if(vid.mspeed >= 5) return; // no animations!
|
||||||
transmatrix T = iadj(m);
|
transmatrix T = iadj(m);
|
||||||
|
bool found_s = animations[layer].count(m.s);
|
||||||
animation& a = animations[layer][m.t];
|
animation& a = animations[layer][m.t];
|
||||||
if(animations[layer].count(m.s)) {
|
if(found_s) {
|
||||||
a = animations[layer][m.s];
|
a = animations[layer][m.s];
|
||||||
a.wherenow = T * a.wherenow;
|
a.wherenow = T * a.wherenow;
|
||||||
animations[layer].erase(m.s);
|
animations[layer].erase(m.s);
|
||||||
|
Loading…
Reference in New Issue
Block a user