• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum for TSPG.


Commit MetaInfo

Revisão89cf3bfb98b1754f1fe2650b17a99e49855afb95 (tree)
Hora2017-01-16 20:10:09
AutorEdoardo Prezioso <edward.san.dev@gmai...>
CommiterEdoardo Prezioso

Mensagem de Log

- Fixed regression with vodoo doll players and hubs (fixes 2960).

Mudança Sumário

Diff

diff -r 5fc925fd0ba6 -r 89cf3bfb98b1 src/cooperative.cpp
--- a/src/cooperative.cpp Sun Jan 01 11:19:51 2017 +0100
+++ b/src/cooperative.cpp Mon Jan 16 12:10:09 2017 +0100
@@ -67,7 +67,7 @@
6767 //*****************************************************************************
6868 // PRIVATE DATA DEFINITIONS
6969
70-player_t DummyPlayer;
70+int dummyplayer = MAXPLAYERS;
7171 TMap<FName, int> UVDpickupMap;
7272
7373 //*****************************************************************************
@@ -204,7 +204,7 @@
204204 // dummy player to get past all the ( player != NULL ) checks. This will require special
205205 // handling wherever the code assumes that non-NULL player pointers have a valid mo.
206206 if ( sv_coopunassignedvoodoodolls )
207- pDoll->player = &DummyPlayer;
207+ pDoll->player = &players[dummyplayer];
208208 }
209209 }
210210
@@ -239,14 +239,14 @@
239239 //
240240 void COOP_InitVoodooDollDummyPlayer ( void )
241241 {
242- DummyPlayer.userinfo.Reset();
242+ players[dummyplayer].userinfo.Reset();
243243 }
244244
245245 //*****************************************************************************
246246 //
247247 const player_t* COOP_GetVoodooDollDummyPlayer ( void )
248248 {
249- return &DummyPlayer;
249+ return &players[dummyplayer];
250250 }
251251
252252 //*****************************************************************************
diff -r 5fc925fd0ba6 -r 89cf3bfb98b1 src/d_player.h
--- a/src/d_player.h Sun Jan 01 11:19:51 2017 +0100
+++ b/src/d_player.h Mon Jan 16 12:10:09 2017 +0100
@@ -767,7 +767,8 @@
767767 };
768768
769769 // Bookkeeping on players - state.
770-extern player_t players[MAXPLAYERS];
770+// [EP] Add 1 slot for the DummyPlayer
771+extern player_t players[MAXPLAYERS + 1];
771772
772773 FArchive &operator<< (FArchive &arc, player_t *&p);
773774
diff -r 5fc925fd0ba6 -r 89cf3bfb98b1 src/g_game.cpp
--- a/src/g_game.cpp Sun Jan 01 11:19:51 2017 +0100
+++ b/src/g_game.cpp Mon Jan 16 12:10:09 2017 +0100
@@ -196,8 +196,8 @@
196196
197197 bool viewactive;
198198
199-player_t players[MAXPLAYERS];
200-bool playeringame[MAXPLAYERS];
199+player_t players[MAXPLAYERS + 1]; // [EP] Add 1 slot for the DummyPlayer
200+bool playeringame[MAXPLAYERS + 1]; // [EP] Add 1 slot for the DummyPlayer
201201
202202 int consoleplayer; // player taking events
203203 int gametic;