mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-15 18:17:19 +00:00
Merge branch 'fix-eggman-transfer-crash' into 'master'
Fix null ref in eggman transfer See merge request KartKrew/Kart!1031
This commit is contained in:
commit
f19de81dd2
1 changed files with 11 additions and 8 deletions
19
src/p_map.c
19
src/p_map.c
|
|
@ -1397,6 +1397,17 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
return BMIT_CONTINUE;
|
||||
}
|
||||
|
||||
if (!P_MobjWasRemoved(thing) && !P_MobjWasRemoved(tm.thing))
|
||||
{
|
||||
if (thing->player->eggmanexplode)
|
||||
{
|
||||
K_EggmanTransfer(thing->player, tm.thing->player);
|
||||
} else if (tm.thing->player->eggmanexplode)
|
||||
{
|
||||
K_EggmanTransfer(tm.thing->player, thing->player);
|
||||
}
|
||||
}
|
||||
|
||||
// The bump has to happen last
|
||||
if (P_IsObjectOnGround(thing) && tm.thing->momz < 0 && tm.thing->player->trickpanel)
|
||||
{
|
||||
|
|
@ -1412,14 +1423,6 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
K_PvPTouchDamage(tm.thing, thing);
|
||||
}
|
||||
|
||||
if (thing->player->eggmanexplode)
|
||||
{
|
||||
K_EggmanTransfer(thing->player, tm.thing->player);
|
||||
} else if (tm.thing->player->eggmanexplode)
|
||||
{
|
||||
K_EggmanTransfer(tm.thing->player, thing->player);
|
||||
}
|
||||
|
||||
return BMIT_CONTINUE;
|
||||
}
|
||||
else if (thing->type == MT_SPECIAL_UFO)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue