mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
Prevent P_GetP from treating player indexes that are >= g_mostConcurrentPlayers as player 0, by checking against MAXPLAYERS instead.
Prevents the "gib on spawn in multiplayer" bug, and allows fake players to work properly. Patch from Striker. git-svn-id: https://svn.eduke32.com/eduke32@6457 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ee94494e3a
commit
029340b3a5
1 changed files with 3 additions and 1 deletions
|
@ -382,7 +382,9 @@ static inline int P_GetP(const void *pSprite)
|
|||
return 0;
|
||||
#else
|
||||
int playerNum = ((const uspritetype *)pSprite)->yvel;
|
||||
if ((unsigned)playerNum >= (unsigned)g_mostConcurrentPlayers)
|
||||
// [JM] Check against MAXPLAYERS as opposed to g_mostConcurrentPlayers
|
||||
// to prevent CON for disconnected/fake players from executing as playernum 0.
|
||||
if ((unsigned)playerNum >= MAXPLAYERS)
|
||||
playerNum = 0;
|
||||
return playerNum;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue