aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_kr.gnut
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-22 16:46:49 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-22 16:46:49 +0000
commitfb32cb1b780c1169a834c951bc0c928199a2b59e (patch)
treee2435cc869fed0fa3f7c3d187335d2350b8b1e14 /Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_kr.gnut
parentdade102a0d4d14ba5ee560022b8e2f1ddf960977 (diff)
downloadNorthstarMods-fb32cb1b780c1169a834c951bc0c928199a2b59e.tar.gz
NorthstarMods-fb32cb1b780c1169a834c951bc0c928199a2b59e.zip
playtest fixes
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_kr.gnut')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_kr.gnut18
1 files changed, 12 insertions, 6 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_kr.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_kr.gnut
index 32753da16..2cbd1372d 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_kr.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_kr.gnut
@@ -45,6 +45,8 @@ void function ClGamemodeKR_Init()
AddCallback_OnClientScriptInit( CreateKRUI )
AddCreateCallback( "item_flag", OnFlagCreated )
AddDestroyCallback( "item_flag", OnFlagDestroyed )
+
+ AddCallback_GameStateEnter( eGameState.Postmatch, DisplayPostMatchTop3 )
}
void function CreateKRUI( entity player )
@@ -66,15 +68,14 @@ void function CreateKRUI( entity player )
void function OnFlagCreated( entity flag )
{
- if ( IsValid( file.flagIncomingRui ) )
- RuiDestroy( file.flagIncomingRui )
-
+ RuiDestroyIfAlive( file.flagIncomingRui )
RuiSetBool( file.flagRui, "isVisible", true )
RuiTrackFloat3( file.flagRui, "pos", flag, RUI_TRACK_OVERHEAD_FOLLOW )
}
void function OnFlagDestroyed( entity flag )
{
+ RuiDestroyIfAlive( file.flagIncomingRui )
RuiSetBool( file.flagRui, "isVisible", false )
}
@@ -202,15 +203,20 @@ void function ServerCallback_NewKillRacer( int playerHandle, float endTime )
void function LerpTimeDuringRace( float endTime )
{
+ GetLocalClientPlayer().EndSignal( "OnDeath" )
+
+ OnThreadEnd( function() : ()
+ {
+ UpdateCurrentTimeAmount( 0.0 )
+ file.isCurrentlyInRace = false
+ })
+
while ( Time() < endTime )
{
// manually update this here so we can get more frequent updates than what we'd get with networked vars
UpdateCurrentTimeAmount( endTime - Time() )
WaitFrame()
}
-
- UpdateCurrentTimeAmount( 0.0 )
- file.isCurrentlyInRace = false
}
void function ServerCallback_EndKillrace( int playerHandle, int score )