From 4287e713b1b03e7090325a956fc24124e6210cb7 Mon Sep 17 00:00:00 2001 From: zicodxx Date: Mon, 16 Apr 2012 01:13:27 +0200 Subject: [PATCH] fixed two bugs caused by recent Multiplayer cleanup: Set more player-death-related veriables outside of dead_player_end() when creating new ship as not covered in subfunction is Palyer_is_dead is not true; also init my own inventory properly in multi_prep_level to get our inventory straight after receiving netgame information --- CHANGELOG.txt | 4 ++++ main/gameseq.c | 4 ++++ main/multi.c | 3 +-- main/multi.h | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 40411b3bd..5bcc17800 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D1X-Rebirth Changelog +20120416 +-------- +main/gameseq.c, main/multi.c, main/multi.h: fixed two bugs caused by recent Multiplayer cleanup: Set more player-death-related veriables outside of dead_player_end() when creating new ship as not covered in subfunction is Palyer_is_dead is not true; also init my own inventory properly in multi_prep_level to get our inventory straight after receiving netgame information + 20120415 -------- main/multi.c, main/multi.h, main/net_udp.c: When possibly sending player positions prior to firing, do that before messing multibuf; Added more strict sanity checks for outgoing and incoming multi packets; Moved some general game stuff from net_udp_init() to multi_new_game() diff --git a/main/gameseq.c b/main/gameseq.c index f5d2e8872..ebe26f486 100644 --- a/main/gameseq.c +++ b/main/gameseq.c @@ -354,6 +354,10 @@ void init_player_stats_new_ship(ubyte pnum) Primary_weapon = 0; Secondary_weapon = 0; dead_player_end(); //player no longer dead + Player_is_dead = 0; + Player_exploded = 0; + Player_eggs_dropped = 0; + Dead_player_camera = 0; } Players[pnum].energy = MAX_ENERGY; diff --git a/main/multi.c b/main/multi.c index 5b895c6db..894876e54 100644 --- a/main/multi.c +++ b/main/multi.c @@ -3027,8 +3027,7 @@ multi_prep_level(void) { PKilledFlags[i]=1; multi_sending_message[i] = 0; - if (i != Player_num) - init_player_stats_new_ship(i); + init_player_stats_new_ship(i); } for (i = 0; i < NumNetPlayerPositions; i++) diff --git a/main/multi.h b/main/multi.h index 26c568d02..7d18e68ef 100644 --- a/main/multi.h +++ b/main/multi.h @@ -72,7 +72,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 10 +#define MULTI_PROTO_VERSION 11 // PROTOCOL VARIABLES AND DEFINES - END