Restore tmthing after a call to P_CheckPosition in G_CheckSpot

This commit is contained in:
Lactozilla 2023-08-06 17:46:45 -03:00
parent d03d597963
commit 0450d2d914

View file

@ -2820,10 +2820,11 @@ static boolean G_CheckSpot(INT32 playernum, mapthing_t *mthing)
x = mthing->x << FRACBITS; x = mthing->x << FRACBITS;
y = mthing->y << FRACBITS; y = mthing->y << FRACBITS;
if (!P_CheckPosition(players[playernum].mo, x, y)) mobj_t *ptmthing = tmthing;
return false; boolean success = P_CheckPosition(players[playernum].mo, x, y);
P_SetTarget(&tmthing, ptmthing);
return true; return success;
} }
// //