mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 12:01:47 +00:00
Merge branch 'round-queue-print' into 'master'
Got_MapQueuecmd: Fix message handling See merge request KartKrew/Kart!1182
This commit is contained in:
commit
e7c9ac1937
1 changed files with 20 additions and 13 deletions
|
|
@ -3438,7 +3438,7 @@ static void Got_RequestMapQueuecmd(UINT8 **cp, INT32 playernum)
|
||||||
|
|
||||||
static void Got_MapQueuecmd(UINT8 **cp, INT32 playernum)
|
static void Got_MapQueuecmd(UINT8 **cp, INT32 playernum)
|
||||||
{
|
{
|
||||||
UINT8 flags, queueposition;
|
UINT8 flags, queueposition, i;
|
||||||
boolean setencore;
|
boolean setencore;
|
||||||
UINT16 setgametype;
|
UINT16 setgametype;
|
||||||
|
|
||||||
|
|
@ -3464,21 +3464,28 @@ static void Got_MapQueuecmd(UINT8 **cp, INT32 playernum)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server)
|
if (!server)
|
||||||
return;
|
|
||||||
|
|
||||||
while (roundqueue.size <= queueposition)
|
|
||||||
{
|
{
|
||||||
memset(&roundqueue.entries[roundqueue.size], 0, sizeof(roundentry_t));
|
while (roundqueue.size <= queueposition)
|
||||||
roundqueue.size++;
|
{
|
||||||
|
memset(&roundqueue.entries[roundqueue.size], 0, sizeof(roundentry_t));
|
||||||
|
roundqueue.size++;
|
||||||
|
}
|
||||||
|
|
||||||
|
G_MapSlipIntoRoundQueue(queueposition, 0, setgametype, setencore, false);
|
||||||
|
|
||||||
|
for (i = 0; i <= splitscreen; i++)
|
||||||
|
{
|
||||||
|
if (!IsPlayerAdmin(g_localplayers[i]))
|
||||||
|
continue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i > splitscreen)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_MapSlipIntoRoundQueue(queueposition, 0, setgametype, setencore, false);
|
CONS_Printf("queuemap: A map was added to the round queue (pos. %u)\n", queueposition+1);
|
||||||
|
|
||||||
if (!IsPlayerAdmin(playernum))
|
|
||||||
return;
|
|
||||||
|
|
||||||
CONS_Printf("queuemap: A map was successfully added to the round queue (position %u)\n", queueposition);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Command_Pause(void)
|
static void Command_Pause(void)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue