mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-12 02:53:08 +00:00
correctly use P_UnsetThingPosition, P_SetThingPosition + P_DelSeclist around MF_NOBLOCKMAP addition in the TNT explosion code
This commit is contained in:
parent
0c49a33b2e
commit
2277b28a5c
1 changed files with 14 additions and 1 deletions
|
|
@ -13015,7 +13015,14 @@ static boolean PIT_TNTExplode(mobj_t *nearby)
|
||||||
nearby->momx = FixedMul(FixedDiv(dx, dm), explodethrust);
|
nearby->momx = FixedMul(FixedDiv(dx, dm), explodethrust);
|
||||||
nearby->momy = FixedMul(FixedDiv(dy, dm), explodethrust);
|
nearby->momy = FixedMul(FixedDiv(dy, dm), explodethrust);
|
||||||
nearby->momz = FixedMul(FixedDiv(dz, dm), explodethrust);
|
nearby->momz = FixedMul(FixedDiv(dz, dm), explodethrust);
|
||||||
|
P_UnsetThingPosition(nearby);
|
||||||
|
if (sector_list)
|
||||||
|
{
|
||||||
|
P_DelSeclist(sector_list);
|
||||||
|
sector_list = NULL;
|
||||||
|
}
|
||||||
nearby->flags = MF_NOBLOCKMAP|MF_MISSILE;
|
nearby->flags = MF_NOBLOCKMAP|MF_MISSILE;
|
||||||
|
P_SetThingPosition(nearby);
|
||||||
P_SetMobjState(nearby, nearby->info->missilestate);
|
P_SetMobjState(nearby, nearby->info->missilestate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -13059,8 +13066,14 @@ void A_TNTExplode(mobj_t *actor)
|
||||||
if (LUA_CallAction("A_TNTExplode", actor))
|
if (LUA_CallAction("A_TNTExplode", actor))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
P_UnsetThingPosition(actor);
|
||||||
|
if (sector_list)
|
||||||
|
{
|
||||||
|
P_DelSeclist(sector_list);
|
||||||
|
sector_list = NULL;
|
||||||
|
}
|
||||||
actor->flags = MF_NOCLIP|MF_NOGRAVITY|MF_NOBLOCKMAP;
|
actor->flags = MF_NOCLIP|MF_NOGRAVITY|MF_NOBLOCKMAP;
|
||||||
|
P_SetThingPosition(actor);
|
||||||
actor->flags2 = MF2_EXPLOSION;
|
actor->flags2 = MF2_EXPLOSION;
|
||||||
if (actor->info->deathsound)
|
if (actor->info->deathsound)
|
||||||
S_StartSound(actor, actor->info->deathsound);
|
S_StartSound(actor, actor->info->deathsound);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue