Fix crash in multi_maybe_disable_friendly_fire() when killer == NULL

This commit is contained in:
zicodxx 2011-05-04 12:05:43 +02:00
parent 02a29235a9
commit adc53702ff
2 changed files with 3 additions and 0 deletions

View file

@ -4,6 +4,7 @@ D1X-Rebirth Changelog
--------
editor/segment.c, main/fvi.c, main/gameseg.c, main/physics.c, main/segment.h: Since current approach to improve wall collisions prevented the player to enter segments which basically are too small for the player ship, added simple bumping function via object_intersects_wall(); Also when validating segments check for segment degeneration outside the editor build, too and set flag in segment structure for all different purposes but right now helps us to disable bumping when encountering degenerated segments and not break such levels
main/endlevel.c: Make sure the big explosion at the end of the escape sequence also uses blending if transparency effects are activated
main/multi.c: Fix crash in multi_maybe_disable_friendly_fire() when killer == NULL
20110424
--------

View file

@ -3340,6 +3340,8 @@ int multi_maybe_disable_friendly_fire(object *killer)
return 0;
if (!Netgame.NoFriendlyFire) // friendly fire is activated -> harm me!
return 0;
if (killer == NULL) // no actual killer -> harm me!
return 0;
if (killer->type != OBJ_PLAYER) // not a player -> harm me!
return 0;
if (Game_mode & GM_MULTI_COOP) // coop mode -> don't harm me!