From 347775de935673cb1e89bca0857d61519c51984c Mon Sep 17 00:00:00 2001 From: zicodxx Date: Fri, 27 Apr 2012 02:09:48 +0200 Subject: [PATCH] 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 --- CHANGELOG.txt | 4 ++++ main/multi.c | 6 +++++- main/multi.h | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6045649ad..51f6ac271 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/main/multi.c b/main/multi.c index da7a30e6f..54d0c3728 100644 --- a/main/multi.c +++ b/main/multi.c @@ -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) diff --git a/main/multi.h b/main/multi.h index ee87ad4d0..21a494fd3 100644 --- a/main/multi.h +++ b/main/multi.h @@ -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