G_ReadMetalTic: Make sure all three values for GZT_XYZ are read in the right order

This commit is contained in:
Monster Iestyn 2020-05-28 16:49:12 +01:00
parent 879a2bd20a
commit d11ba67288

View file

@ -996,7 +996,11 @@ void G_ReadMetalTic(mobj_t *metal)
// Read changes from the tic
if (ziptic & GZT_XYZ)
{
P_TeleportMove(metal, READFIXED(metal_p), READFIXED(metal_p), READFIXED(metal_p));
// make sure the values are read in the right order
oldmetal.x = READFIXED(metal_p);
oldmetal.y = READFIXED(metal_p);
oldmetal.z = READFIXED(metal_p);
P_TeleportMove(metal, oldmetal.x, oldmetal.y, oldmetal.z);
oldmetal.x = metal->x;
oldmetal.y = metal->y;
oldmetal.z = metal->z;