Set oldxp/oldyp when player teleports through warp token

This fixes the bug where it would appear as if they "zipped" to the
destination from the warp token.

Fixes #384.
This commit is contained in:
Misa
2020-07-21 14:55:14 -07:00
committed by Ethan Lee
parent ff8d616438
commit 18b7d1ca14

View File

@@ -893,6 +893,8 @@ void mapclass::warpto(int rx, int ry , int t, int tx, int ty)
{ {
obj.entities[t].xp = tx * 8; obj.entities[t].xp = tx * 8;
obj.entities[t].yp = (ty * 8) - obj.entities[t].h; obj.entities[t].yp = (ty * 8) - obj.entities[t].h;
obj.entities[t].oldxp = obj.entities[t].xp;
obj.entities[t].oldyp = obj.entities[t].yp;
} }
game.gravitycontrol = 0; game.gravitycontrol = 0;
} }