TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 666 - TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 0));
+ // in campaign the game ends when the player destroys the objective, there's no second round
if(ent.cnt == 1 || autocvar_g_campaign) // this was the second round or the only round in campaign
{
status = WINNING_YES;
MUTATOR_HOOKFUNCTION(as, ReadyRestart_Deny)
{
- // readyrestart not supported (yet)
- // it's supported only in campaign mode (single round mode), since campaign requires it
+ // readyrestart not supported
+ // it's allowed only in campaign since the campaign requires readyrestart support
+ // to do so Assault is played in single round mode
if (autocvar_g_campaign)
return false;
return true;
void ReadyRestart(bool forceWarmupEnd)
{
- if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || intermission_running || race_completing)
+ if (MUTATOR_CALLHOOK(ReadyRestart_Deny))
{
// NOTE: ReadyRestart support is mandatory in campaign
if (autocvar_g_campaign)
error("ReadyRestart must be supported in campaign mode!");
localcmd("restart\n"); // if ReadyRestart is denied, restart the server
}
- else localcmd("\nsv_hook_readyrestart\n");
+ else if (intermission_running || race_completing) // game is over, ReadyRestart no longer available
+ localcmd("restart\n");
+ else
+ localcmd("\nsv_hook_readyrestart\n");
if(forceWarmupEnd || autocvar_g_campaign)
warmup_stage = 0; // forcefully end warmup and go to match stage