aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut13
1 files changed, 12 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
index e02ca7e3..42aa4a62 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
@@ -9,6 +9,7 @@ global function AddCallback_OnRoundEndCleanup
global function SetShouldUsePickLoadoutScreen
global function SetSwitchSidesBased
global function SetSuddenDeathBased
+global function SetTimerBased
global function SetShouldUseRoundWinningKillReplay
global function SetRoundWinningKillReplayKillClasses
global function SetRoundWinningKillReplayAttacker
@@ -28,6 +29,7 @@ struct {
bool usePickLoadoutScreen
bool switchSidesBased
bool suddenDeathBased
+ bool timerBased = true
int functionref() timeoutWinnerDecisionFunc
// for waitingforplayers
@@ -228,7 +230,7 @@ void function GameStateEnter_Playing_Threaded()
endTime = expect float( GetServerVar( "gameEndTime" ) )
// time's up!
- if ( Time() >= endTime )
+ if ( Time() >= endTime && file.timerBased )
{
int winningTeam
if ( file.timeoutWinnerDecisionFunc != null )
@@ -279,6 +281,10 @@ void function GameStateEnter_WinnerDetermined_Threaded()
}
WaitFrame() // wait a frame so other scripts can setup killreplay stuff
+
+ // set gameEndTime to current time, so hud doesn't display time left in the match
+ SetServerVar( "gameEndTime", Time() )
+ SetServerVar( "roundEndTime", Time() )
entity replayAttacker = file.roundWinningKillReplayAttacker
bool doReplay = Replay_IsEnabled() && IsRoundWinningKillReplayEnabled() && IsValid( replayAttacker ) && !ClassicMP_ShouldRunEpilogue()
@@ -715,6 +721,11 @@ void function SetSuddenDeathBased( bool suddenDeathBased )
file.suddenDeathBased = suddenDeathBased
}
+void function SetTimerBased( bool timerBased )
+{
+ file.timerBased = timerBased
+}
+
void function SetShouldUseRoundWinningKillReplay( bool shouldUse )
{
SetServerVar( "roundWinningKillReplayEnabled", shouldUse )