- fix: check if bombsource exists when exploding a projectile with a XF_NOALLIES flag

This commit is contained in:
Rachael Alexanderson 2024-08-07 11:11:46 -04:00
parent 593e1c0225
commit 847f34f2c9
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0

View file

@ -6169,7 +6169,7 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, double
continue; continue;
//[inkoalawetrust] Don't harm actors friendly to the explosions' source. But do harm the source. //[inkoalawetrust] Don't harm actors friendly to the explosions' source. But do harm the source.
if ((flags & RADF_NOALLIES) && bombsource->IsFriend(thing) && !(thing == bombsource || thing == bombspot)) if ((flags & RADF_NOALLIES) && bombsource && bombsource->IsFriend(thing) && !(thing == bombsource || thing == bombspot))
continue; continue;
if (bombsource && thing != bombsource && bombsource->player && P_ShouldPassThroughPlayer(bombsource, thing)) if (bombsource && thing != bombsource && bombsource->player && P_ShouldPassThroughPlayer(bombsource, thing))