Change respawn check on turbines, unset tracer if respawnstate is set mid-turbine somehow

This commit is contained in:
Lat 2024-01-06 13:09:01 +01:00
parent 8c525621c8
commit 94e7a8e897

View file

@ -153,7 +153,7 @@ void Obj_WPZTurbineThinker(mobj_t *mo)
if (R_PointToDist2(pmo->x, pmo->y, mo->x, mo->y) < range if (R_PointToDist2(pmo->x, pmo->y, mo->x, mo->y) < range
&& !p->turbine && !p->turbine
&& !p->respawn.timer) && p->respawn.state == RESPAWNST_NONE)
{ {
P_SetTarget(&pmo->tracer, mo); P_SetTarget(&pmo->tracer, mo);
p->turbine = turbinetime; p->turbine = turbinetime;
@ -206,7 +206,7 @@ void Obj_playerWPZTurbine(player_t *p)
fixed_t momz; fixed_t momz;
if (!t || P_MobjWasRemoved(t)) if (!t || P_MobjWasRemoved(t) || p->respawn.state != RESPAWNST_NONE)
{ {
p->turbine = false; p->turbine = false;
P_SetTarget(&pmo->tracer, NULL); P_SetTarget(&pmo->tracer, NULL);