From: ThePWTULN Date: Fri, 27 Aug 2010 11:15:10 +0000 (+0100) Subject: Autofail when timelimit expires. Doesn't affect untimed levels. X-Git-Tag: xonotic-v0.1.0preview~266^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=669c8376ed12ed0039a6ea7eb2ed9615c03411f3;p=xonotic%2Fxonotic-data.pk3dir.git Autofail when timelimit expires. Doesn't affect untimed levels. --- diff --git a/qcsrc/server/campaign.qc b/qcsrc/server/campaign.qc index 8d8e18587..300d01a7a 100644 --- a/qcsrc/server/campaign.qc +++ b/qcsrc/server/campaign.qc @@ -188,8 +188,23 @@ void CampaignPreIntermission() if(won == 1 && lost == 0 && checkrules_equality == 0 && cheatcount_total == 0) { + if(cvar("timelimit") != 0 && time > cvar("timelimit") * 60) // checks if the timelimit has expired. + { + campaign_won = 0; + bprint("Time's up! The current level has been LOST.\n"); + // sound! + } + else + { campaign_won = 1; bprint("The current level has been WON.\n"); + // sound! + } + } + else if(cvar("timelimit") != 0 && time > cvar("timelimit") * 60) + { + campaign_won = 0; + bprint("Time's up! The current level has been LOST.\n"); // sound! } else