Similar to Network_new_game introduced imulti_new_game to exclusivly use in multi.c to execute stuff in new level only when starting a new game - for example resetting player ship inventory which is not supposed to happen on each level

This commit is contained in:
zicodxx 2012-04-27 02:09:48 +02:00
parent 6e0abf59c4
commit 347775de93
3 changed files with 10 additions and 2 deletions

View file

@ -1,5 +1,9 @@
D2X-Rebirth Changelog
20120427
--------
main/multi.c, main/multi.h: Similar to Network_new_game introduced imulti_new_game to exclusivly use in multi.c to execute stuff in new level only when starting a new game - for example resetting player ship inventory which is not supposed to happen on each level
20120424
--------
main/gauges.c: little reorganization for draw_hud(): draw multiplayer names first, reticle last to prevent anything being drawn over by floating names and reticle not messed by anything else

View file

@ -114,6 +114,7 @@ void drop_player_eggs(object *player); // from collide.c
//
int multi_protocol=0; // set and determinate used protocol
int imulti_new_game=0; // to prep stuff for level only when starting new game
extern vms_vector MarkerPoint[];
extern char MarkerMessage[16][40];
@ -517,6 +518,7 @@ multi_new_game(void)
}
team_kills[0] = team_kills[1] = 0;
imulti_new_game=1;
multi_quit_game = 0;
Show_kill_list = 1;
game_disable_cheats();
@ -3332,7 +3334,8 @@ void multi_prep_level(void)
{
PKilledFlags[i]=1;
multi_sending_message[i] = 0;
init_player_stats_new_ship(i);
if (imulti_new_game)
init_player_stats_new_ship(i);
}
for (i = 0; i < NumNetPlayerPositions; i++)
@ -3533,6 +3536,7 @@ void multi_prep_level(void)
reset_player_object();
imulti_new_game=0;
}
int multi_level_sync(void)

View file

@ -68,7 +68,7 @@ extern int multi_protocol; // set and determinate used protocol
// 3 Descent II Shareware
// 4 Descent II Commercial
// > 4 DXX-Rebirth
#define MULTI_PROTO_VERSION 12
#define MULTI_PROTO_VERSION 13
// PROTOCOL VARIABLES AND DEFINES - END