1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-20 08:27:39 +00:00

used movei in movement animations; also replaced animateReplacement with indAnimateMovement

This commit is contained in:
Zeno Rogue
2019-11-22 16:32:05 +01:00
parent 8ac9562c31
commit 3078451283
3 changed files with 48 additions and 45 deletions

View File

@@ -8610,8 +8610,12 @@ EX bool movepcto(int d, int subdir IS(1), bool checkonly IS(false)) {
cell *c1 = cwt.at;
int d = cwt.spin;
cwt += wstep;
if(switchplaces)
animateReplacement(c1, cwt.at, LAYER_SMALL, d, cwt.spin);
if(switchplaces) {
movei m(c1, cwt.at, cwt.spin);
indAnimateMovement(m, LAYER_SMALL);
indAnimateMovement(m.rev(), LAYER_SMALL);
commitAnimations(LAYER_SMALL);
}
else
animateMovement(c1, cwt.at, LAYER_SMALL, d);