aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts/vscripts/state_client.nut
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts/state_client.nut')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/state_client.nut13
1 files changed, 12 insertions, 1 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/state_client.nut b/Northstar.Client/mod/scripts/vscripts/state_client.nut
index 3a0ed611..2a380e35 100644
--- a/Northstar.Client/mod/scripts/vscripts/state_client.nut
+++ b/Northstar.Client/mod/scripts/vscripts/state_client.nut
@@ -16,7 +16,9 @@ void function OnPrematchStart()
void function NSUpdateGameStateClientStart()
{
+ #if MP
AddCallback_GameStateEnter( eGameState.Prematch, OnPrematchStart )
+ #endif
thread NSUpdateGameStateLoopClient()
OnPrematchStart()
}
@@ -25,6 +27,14 @@ void function NSUpdateGameStateLoopClient()
{
while ( true )
{
+ if(GetConVarString( "mp_gamemode" ) == "solo")
+ {
+
+ NSUpdateGameStateClient( GetPlayerArray().len(), GetCurrentPlaylistVarInt( "max_players", 65535 ), 1, 1, 1, GetServerVar( "roundBased" ), 1 )
+ wait 1.0
+ }
+ else
+ {
foreach ( player in GetPlayerArray() )
{
if ( GameRules_GetTeamScore( player.GetTeam() ) >= highestScore )
@@ -45,4 +55,5 @@ void function NSUpdateGameStateLoopClient()
OnPrematchStart()
wait 1.0
}
-} \ No newline at end of file
+ }
+}