Fix crash in multi_maybe_disable_friendly_fire() when killer == NULL; Do not let player join game when gamemode is HOARD or TEAM HOARD and hoard.ham is not available

This commit is contained in:
zicodxx 2011-05-04 12:05:59 +02:00
parent 98e3706ada
commit 040407cf02
4 changed files with 15 additions and 0 deletions

View file

@ -4,6 +4,7 @@ D2X-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; Do not let player join game when gamemode is HOARD or TEAM HOARD and hoard.ham is not available
20110422
--------

View file

@ -4895,6 +4895,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!

View file

@ -3956,6 +3956,12 @@ int net_ipx_do_join_game(int choice)
}
}
if ( !HoardEquipped() && (Active_ipx_games[choice].gamemode == NETGAME_HOARD || Active_ipx_games[choice].gamemode == NETGAME_TEAM_HOARD) )
{
nm_messagebox(TXT_SORRY, 1, TXT_OK, "HOARD(.ham) not installed. You can't join.");
return 0;
}
if (!net_ipx_wait_for_all_info (0))
{
nm_messagebox (TXT_SORRY,1,TXT_OK,"There was a join error!");

View file

@ -4008,6 +4008,12 @@ int net_udp_do_join_game()
}
}
if ( !HoardEquipped() && (Netgame.gamemode == NETGAME_HOARD || Netgame.gamemode == NETGAME_TEAM_HOARD) )
{
nm_messagebox(TXT_SORRY, 1, TXT_OK, "HOARD(.ham) not installed. You can't join.");
return 0;
}
Network_status = NETSTAT_BROWSING; // We are looking at a game menu
if (!net_udp_can_join_netgame(&Netgame))