From a64ebd8e36b6cd13f18163d0a3365f4e80d90805 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Mon, 30 Mar 2015 16:34:12 +0200 Subject: 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. --- src/hexen/in_lude.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/hexen/in_lude.c') diff --git a/src/hexen/in_lude.c b/src/hexen/in_lude.c index daabf497..7b137006 100644 --- a/src/hexen/in_lude.c +++ b/src/hexen/in_lude.c @@ -106,7 +106,7 @@ void IN_Start(void) skipintermission = false; intertime = 0; AM_Stop(); - for (i = 0; i < MAXPLAYERS; i++) + for (i = 0; i < maxplayers; i++) { players[i].messageTics = 0; players[i].message[0] = 0; @@ -208,13 +208,13 @@ static void InitStats(void) posnum = 0; playercount = 0; slaughtercount = 0; - for (i = 0; i < MAXPLAYERS; i++) + for (i = 0; i < maxplayers; i++) { totalFrags[i] = 0; if (playeringame[i]) { playercount++; - for (j = 0; j < MAXPLAYERS; j++) + for (j = 0; j < maxplayers; j++) { if (playeringame[j]) { @@ -338,7 +338,7 @@ static void CheckForSkip(void) player_t *player; static boolean triedToSkip; - for (i = 0, player = players; i < MAXPLAYERS; i++, player++) + for (i = 0, player = players; i < maxplayers; i++, player++) { if (playeringame[i]) { @@ -478,10 +478,10 @@ static void DrDeathTally(void) S_StartSound(NULL, SFX_PLATFORM_STOP); } y = yPos >> FRACBITS; - for (i = 0; i < MAXPLAYERS; i++) + for (i = 0; i < maxplayers; i++) { xPos = xStart; - for (j = 0; j < MAXPLAYERS; j++, xPos += xDelta) + for (j = 0; j < maxplayers; j++, xPos += xDelta) { x = xPos >> FRACBITS; bold = (i == consoleplayer || j == consoleplayer); -- cgit v1.2.3