Fix turbine crash if tracer is set to a different mobj type or lacking spawnpoint info

This commit is contained in:
Ashnal 2025-05-18 14:20:16 -04:00
parent bdc6318cd4
commit 1350078282

View file

@ -206,7 +206,7 @@ void Obj_playerWPZTurbine(player_t *p)
fixed_t momz;
if (!t || P_MobjWasRemoved(t) || p->respawn.state != RESPAWNST_NONE)
if (!t || P_MobjWasRemoved(t) || t->type != MT_WATERPALACETURBINE || !t->spawnpoint || p->respawn.state != RESPAWNST_NONE)
{
p->turbine = false;
P_SetTarget(&pmo->tracer, NULL);