mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Maybe fixed
This commit is contained in:
parent
2a563d6f25
commit
a1be15134e
1 changed files with 6 additions and 6 deletions
12
src/g_game.c
12
src/g_game.c
|
|
@ -257,7 +257,7 @@ boolean legitimateexit; // Did this client actually finish the match?
|
||||||
boolean comebackshowninfo; // Have you already seen the "ATTACK OR PROTECT" message?
|
boolean comebackshowninfo; // Have you already seen the "ATTACK OR PROTECT" message?
|
||||||
tic_t curlap; // Current lap time
|
tic_t curlap; // Current lap time
|
||||||
tic_t bestlap; // Best lap time
|
tic_t bestlap; // Best lap time
|
||||||
static INT16 randmapbuffer[NUMMAPS-4]; // Buffer for maps RandMap is allowed to roll
|
static INT16 randmapbuffer[NUMMAPS]; // Buffer for maps RandMap is allowed to roll
|
||||||
|
|
||||||
tic_t hidetime;
|
tic_t hidetime;
|
||||||
|
|
||||||
|
|
@ -3131,7 +3131,7 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean ignorebuffer)
|
||||||
|
|
||||||
if (!ignorebuffer)
|
if (!ignorebuffer)
|
||||||
{
|
{
|
||||||
for (bufx = 0; bufx < NUMMAPS-4; bufx++)
|
for (bufx = 0; bufx < NUMMAPS; bufx++)
|
||||||
{
|
{
|
||||||
if (randmapbuffer[bufx] == -1) // Rest of buffer SHOULD be empty
|
if (randmapbuffer[bufx] == -1) // Rest of buffer SHOULD be empty
|
||||||
break;
|
break;
|
||||||
|
|
@ -3153,13 +3153,13 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean ignorebuffer)
|
||||||
return G_RandMap(tolflags, pprevmap, true); // If there's no matches, (An incredibly silly function chain, buuut... :V)
|
return G_RandMap(tolflags, pprevmap, true); // If there's no matches, (An incredibly silly function chain, buuut... :V)
|
||||||
|
|
||||||
ix = 0; // Sorry, none match. You get MAP01.
|
ix = 0; // Sorry, none match. You get MAP01.
|
||||||
for (bufx = 0; bufx < NUMMAPS-4; bufx++)
|
for (bufx = 0; bufx < NUMMAPS; bufx++)
|
||||||
randmapbuffer[bufx] = -1; // if we're having trouble finding a map we should probably clear it
|
randmapbuffer[bufx] = -1; // if we're having trouble finding a map we should probably clear it
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ix = okmaps[M_RandomKey(numokmaps)];
|
ix = okmaps[M_RandomKey(numokmaps)];
|
||||||
for (bufx = NUMMAPS-4; bufx > 0; bufx--)
|
for (bufx = NUMMAPS; bufx > 0; bufx--)
|
||||||
randmapbuffer[bufx] = randmapbuffer[bufx-1];
|
randmapbuffer[bufx] = randmapbuffer[bufx-1];
|
||||||
randmapbuffer[0] = ix;
|
randmapbuffer[0] = ix;
|
||||||
}
|
}
|
||||||
|
|
@ -3289,9 +3289,9 @@ static void G_DoCompleted(void)
|
||||||
|
|
||||||
automapactive = false;
|
automapactive = false;
|
||||||
|
|
||||||
if (randmapbuffer[TOLMaps(G_TOLFlag(gametype))-4] != -1) // filled up, so lets clear it
|
if (randmapbuffer[TOLMaps(G_TOLFlag(gametype))-5] != -1) // we're getting pretty full, so lets clear it
|
||||||
{
|
{
|
||||||
for (i = 0; i < NUMMAPS-4; i++)
|
for (i = 0; i < NUMMAPS; i++)
|
||||||
randmapbuffer[i] = -1;
|
randmapbuffer[i] = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue