diff options
author | Fabian Greffrath | 2015-03-30 16:34:12 +0200 |
---|---|---|
committer | Fabian Greffrath | 2015-03-30 16:57:42 +0200 |
commit | a64ebd8e36b6cd13f18163d0a3365f4e80d90805 (patch) | |
tree | 9f1c93a10e4e9ad1c9f370ff57c261b0c60b1d22 /src/hexen/am_map.c | |
parent | 27b5915111ffbdae97ce0c415157e104ee6f3493 (diff) | |
download | chocolate-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/am_map.c')
-rw-r--r-- | src/hexen/am_map.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/hexen/am_map.c b/src/hexen/am_map.c index 2d082415..6a28b45c 100644 --- a/src/hexen/am_map.c +++ b/src/hexen/am_map.c @@ -292,7 +292,7 @@ void AM_initVariables(void) // find player to center on initially if (!playeringame[pnum = consoleplayer]) - for (pnum = 0; pnum < MAXPLAYERS; pnum++) + for (pnum = 0; pnum < maxplayers; pnum++) if (playeringame[pnum]) break; plr = &players[pnum]; @@ -1280,7 +1280,7 @@ void AM_drawPlayers(void) return; } - for (i = 0; i < MAXPLAYERS; i++) + for (i = 0; i < maxplayers; i++) { their_color++; p = &players[i]; @@ -1418,12 +1418,12 @@ void AM_DrawDeathmatchStats(void) char textBuffer[80]; int yPosition; - for (i = 0; i < MAXPLAYERS; i++) + for (i = 0; i < maxplayers; i++) { fragCount[i] = 0; order[i] = -1; } - for (i = 0; i < MAXPLAYERS; i++) + for (i = 0; i < maxplayers; i++) { if (!playeringame[i]) { @@ -1431,14 +1431,14 @@ void AM_DrawDeathmatchStats(void) } else { - for (j = 0; j < MAXPLAYERS; j++) + for (j = 0; j < maxplayers; j++) { if (playeringame[j]) { fragCount[i] += players[i].frags[j]; } } - for (k = 0; k < MAXPLAYERS; k++) + for (k = 0; k < maxplayers; k++) { if (order[k] == -1) { @@ -1447,7 +1447,7 @@ void AM_DrawDeathmatchStats(void) } else if (fragCount[i] > fragCount[order[k]]) { - for (m = MAXPLAYERS - 1; m > k; m--) + for (m = maxplayers - 1; m > k; m--) { order[m] = order[m - 1]; } @@ -1458,7 +1458,7 @@ void AM_DrawDeathmatchStats(void) } } yPosition = 15; - for (i = 0; i < MAXPLAYERS; i++) + for (i = 0; i < maxplayers; i++) { if (!playeringame[order[i]]) { |