aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH0L0theBard <97146561+H0L0theBard@users.noreply.github.com>2022-04-06 23:56:11 +1000
committerGitHub <noreply@github.com>2022-04-06 14:56:11 +0100
commitd8cbd386a5e1b76625e7192a147d41fc1ae12e1d (patch)
tree38b16d23680290e578483d1e22fe0711230c06db
parent19943fbd1884aa8d2ba82a97916bda6dae65faf3 (diff)
downloadNorthstarMods-d8cbd386a5e1b76625e7192a147d41fc1ae12e1d.tar.gz
NorthstarMods-d8cbd386a5e1b76625e7192a147d41fc1ae12e1d.zip
Campaign RPC fix (#285)
* Update state_ui.nut * Update state_client.nut * Update state_ui.nut * Fix accidental whitespace Co-authored-by: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Co-authored-by: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
-rw-r--r--Northstar.Client/mod/scripts/vscripts/state_client.nut13
-rw-r--r--Northstar.Client/mod/scripts/vscripts/state_ui.nut11
2 files changed, 21 insertions, 3 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
+ }
+}
diff --git a/Northstar.Client/mod/scripts/vscripts/state_ui.nut b/Northstar.Client/mod/scripts/vscripts/state_ui.nut
index 907e38fa..51e4856f 100644
--- a/Northstar.Client/mod/scripts/vscripts/state_ui.nut
+++ b/Northstar.Client/mod/scripts/vscripts/state_ui.nut
@@ -24,6 +24,13 @@ void function NSUpdateGameStateLoopUI()
continue
}
NSSetLoading( false )
+ if(GetConVarString( "mp_gamemode" ) == "solo")
+ {
+ NSUpdateGameStateUI( "northstar", Localize( GetMapDisplayName( GetActiveLevel()+"_CAMPAIGN_NAME" ) ) , "Campaign", "Campaign", IsFullyConnected(), false )
+
+ }
+ else{
NSUpdateGameStateUI( GetActiveLevel(), Localize( GetMapDisplayName( GetActiveLevel() ) ), GetConVarString( "mp_gamemode" ), Localize( GetPlaylistDisplayName( GetConVarString("mp_gamemode") ) ), IsFullyConnected(), false )
- }
-} \ No newline at end of file
+ }
+}
+}