This is a fork of Zandronum for TSPG.
Revisão | 89cf3bfb98b1754f1fe2650b17a99e49855afb95 (tree) |
---|---|
Hora | 2017-01-16 20:10:09 |
Autor | Edoardo Prezioso <edward.san.dev@gmai...> |
Commiter | Edoardo Prezioso |
- Fixed regression with vodoo doll players and hubs (fixes 2960).
@@ -67,7 +67,7 @@ | ||
67 | 67 | //***************************************************************************** |
68 | 68 | // PRIVATE DATA DEFINITIONS |
69 | 69 | |
70 | -player_t DummyPlayer; | |
70 | +int dummyplayer = MAXPLAYERS; | |
71 | 71 | TMap<FName, int> UVDpickupMap; |
72 | 72 | |
73 | 73 | //***************************************************************************** |
@@ -204,7 +204,7 @@ | ||
204 | 204 | // dummy player to get past all the ( player != NULL ) checks. This will require special |
205 | 205 | // handling wherever the code assumes that non-NULL player pointers have a valid mo. |
206 | 206 | if ( sv_coopunassignedvoodoodolls ) |
207 | - pDoll->player = &DummyPlayer; | |
207 | + pDoll->player = &players[dummyplayer]; | |
208 | 208 | } |
209 | 209 | } |
210 | 210 |
@@ -239,14 +239,14 @@ | ||
239 | 239 | // |
240 | 240 | void COOP_InitVoodooDollDummyPlayer ( void ) |
241 | 241 | { |
242 | - DummyPlayer.userinfo.Reset(); | |
242 | + players[dummyplayer].userinfo.Reset(); | |
243 | 243 | } |
244 | 244 | |
245 | 245 | //***************************************************************************** |
246 | 246 | // |
247 | 247 | const player_t* COOP_GetVoodooDollDummyPlayer ( void ) |
248 | 248 | { |
249 | - return &DummyPlayer; | |
249 | + return &players[dummyplayer]; | |
250 | 250 | } |
251 | 251 | |
252 | 252 | //***************************************************************************** |
@@ -767,7 +767,8 @@ | ||
767 | 767 | }; |
768 | 768 | |
769 | 769 | // 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]; | |
771 | 772 | |
772 | 773 | FArchive &operator<< (FArchive &arc, player_t *&p); |
773 | 774 |
@@ -196,8 +196,8 @@ | ||
196 | 196 | |
197 | 197 | bool viewactive; |
198 | 198 | |
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 | |
201 | 201 | |
202 | 202 | int consoleplayer; // player taking events |
203 | 203 | int gametic; |