mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-broly-crash' into 'master'
Fix dereferncing Broly null pointer See merge request KartKrew/Kart!1708
This commit is contained in:
commit
308c97c84c
2 changed files with 9 additions and 2 deletions
|
|
@ -875,8 +875,10 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim)
|
|||
attackerPlayer->flashing = 0;
|
||||
|
||||
// Localized broly for a local event.
|
||||
mobj_t *broly = Obj_SpawnBrolyKi(victim, victimHitlag);
|
||||
broly->extravalue2 = 16*mapobjectscale;
|
||||
if (mobj_t *broly = Obj_SpawnBrolyKi(victim, victimHitlag))
|
||||
{
|
||||
broly->extravalue2 = 16*mapobjectscale;
|
||||
}
|
||||
|
||||
P_PlayVictorySound(victim);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,11 @@ Obj_SpawnBrolyKi
|
|||
{
|
||||
Broly* x = Broly::spawn<Broly>(static_cast<Mobj*>(source), duration, {64 * mapobjectscale, 0});
|
||||
|
||||
if (!x)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
x->colorized = true;
|
||||
x->color = source->color;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue