summaryrefslogtreecommitdiff
path: root/src/hexen/p_setup.c
diff options
context:
space:
mode:
authorFabian Greffrath2015-03-30 16:34:12 +0200
committerFabian Greffrath2015-03-30 16:57:42 +0200
commita64ebd8e36b6cd13f18163d0a3365f4e80d90805 (patch)
tree9f1c93a10e4e9ad1c9f370ff57c261b0c60b1d22 /src/hexen/p_setup.c
parent27b5915111ffbdae97ce0c415157e104ee6f3493 (diff)
downloadchocolate-doom-a64ebd8e36b6cd13f18163d0a3365f4e80d90805.tar.gz
chocolate-doom-a64ebd8e36b6cd13f18163d0a3365f4e80d90805.tar.bz2
chocolate-doom-a64ebd8e36b6cd13f18163d0a3365f4e80d90805.zip
Turn maxplayers into a global variable
... and decrease its value from MAXPLAYERS (i.e. 8) to 4 if (gamemode == shareware). It seems that it was hard-coded to this value until some time between the releases of the Demo and the Full version. Arrays are still declared with their full width of 8, though, they are just not iterated over the whole range anymore. This fixes playback of the IWAD demos.
Diffstat (limited to 'src/hexen/p_setup.c')
-rw-r--r--src/hexen/p_setup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hexen/p_setup.c b/src/hexen/p_setup.c
index 428e6166..f24fb34e 100644
--- a/src/hexen/p_setup.c
+++ b/src/hexen/p_setup.c
@@ -387,7 +387,7 @@ void P_LoadThings(int lump)
return;
}
playerCount = 0;
- for (i = 0; i < MAXPLAYERS; i++)
+ for (i = 0; i < maxplayers; i++)
{
playerCount += playeringame[i];
}
@@ -672,7 +672,7 @@ void P_SetupLevel(int episode, int map, int playermask, skill_t skill)
int lumpnum;
mobj_t *mobj;
- for (i = 0; i < MAXPLAYERS; i++)
+ for (i = 0; i < maxplayers; i++)
{
players[i].killcount = players[i].secretcount
= players[i].itemcount = 0;
@@ -722,7 +722,7 @@ void P_SetupLevel(int episode, int map, int playermask, skill_t skill)
TimerGame = 0;
if (deathmatch)
{
- for (i = 0; i < MAXPLAYERS; i++)
+ for (i = 0; i < maxplayers; i++)
{
if (playeringame[i])
{ // must give a player spot before deathmatchspawn