mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 10:51:42 +00:00
Two new command automation events
- "QueueStart"
- Activates just before RoundStart, but only if a roundqueue is being started
- "QueueEnd"
- Activates just before IntermissionStart, but only if the roundqueue has just finished its final map
I chose before in both instances because Automate_Run runs off COM_BufAddText, and I don't completely trust that the buffer won't overflow for particularly complicated server commands, so prioritising the rarer event. However, this is open for discussion
This commit is contained in:
parent
99a1e47487
commit
b72bc73d28
4 changed files with 15 additions and 1 deletions
|
|
@ -592,7 +592,9 @@ const char *automate_names[AEV__MAX] =
|
||||||
{
|
{
|
||||||
"RoundStart", // AEV_ROUNDSTART
|
"RoundStart", // AEV_ROUNDSTART
|
||||||
"IntermissionStart", // AEV_INTERMISSIONSTART
|
"IntermissionStart", // AEV_INTERMISSIONSTART
|
||||||
"VoteStart" // AEV_VOTESTART
|
"VoteStart", // AEV_VOTESTART
|
||||||
|
"QueueStart", // AEV_QUEUESTART
|
||||||
|
"QueueEnd", // AEV_QUEUEEND
|
||||||
};
|
};
|
||||||
|
|
||||||
UINT32 livestudioaudience_timer = 90;
|
UINT32 livestudioaudience_timer = 90;
|
||||||
|
|
|
||||||
|
|
@ -276,6 +276,8 @@ typedef enum
|
||||||
AEV_ROUNDSTART,
|
AEV_ROUNDSTART,
|
||||||
AEV_INTERMISSIONSTART,
|
AEV_INTERMISSIONSTART,
|
||||||
AEV_VOTESTART,
|
AEV_VOTESTART,
|
||||||
|
AEV_QUEUESTART,
|
||||||
|
AEV_QUEUEEND,
|
||||||
AEV__MAX
|
AEV__MAX
|
||||||
} automateEvents_t;
|
} automateEvents_t;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1598,6 +1598,11 @@ void G_DoLoadLevelEx(boolean resetplayer, gamestate_t newstate)
|
||||||
|
|
||||||
if (doAutomate == true)
|
if (doAutomate == true)
|
||||||
{
|
{
|
||||||
|
if (roundqueue.size > 0 && roundqueue.position == 1)
|
||||||
|
{
|
||||||
|
Automate_Run(AEV_QUEUESTART);
|
||||||
|
}
|
||||||
|
|
||||||
Automate_Run(AEV_ROUNDSTART);
|
Automate_Run(AEV_ROUNDSTART);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -849,6 +849,11 @@ void Y_StartIntermission(void)
|
||||||
K_CashInPowerLevels();
|
K_CashInPowerLevels();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (roundqueue.size > 0 && roundqueue.position == roundqueue.size)
|
||||||
|
{
|
||||||
|
Automate_Run(AEV_QUEUEEND);
|
||||||
|
}
|
||||||
|
|
||||||
Automate_Run(AEV_INTERMISSIONSTART);
|
Automate_Run(AEV_INTERMISSIONSTART);
|
||||||
bgpatch = W_CachePatchName("MENUBG", PU_STATIC);
|
bgpatch = W_CachePatchName("MENUBG", PU_STATIC);
|
||||||
widebgpatch = W_CachePatchName("WEIRDRES", PU_STATIC);
|
widebgpatch = W_CachePatchName("WEIRDRES", PU_STATIC);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue