aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts
diff options
context:
space:
mode:
authorConnie Price <contact@connieprice.co.uk>2022-01-19 21:34:30 +0000
committerBarichello <artur@barichello.me>2022-01-20 17:30:02 -0300
commit8036197f7d7b74b3a9b88465106874e1a2edf48d (patch)
tree6972a283989042fc97b8cb38fd9cad7105e9937d /Northstar.Custom/mod/scripts
parentd72946a3ddcba685472b3f4b76c70dff00133d78 (diff)
downloadNorthstarMods-8036197f7d7b74b3a9b88465106874e1a2edf48d.tar.gz
NorthstarMods-8036197f7d7b74b3a9b88465106874e1a2edf48d.zip
Fixed gungame meter gamemode check.
Diffstat (limited to 'Northstar.Custom/mod/scripts')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/sh_gg_earn_meter.gnut12
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut3
2 files changed, 12 insertions, 3 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/sh_gg_earn_meter.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/sh_gg_earn_meter.gnut
index 0428ecfa7..d3e506ce5 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/sh_gg_earn_meter.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/sh_gg_earn_meter.gnut
@@ -1,12 +1,22 @@
global function Sh_GGEarnMeter_Init
-void function Sh_GGEarnMeter_Init()
+struct
{
+ string gamemode = ""
+} file
+
+void function Sh_GGEarnMeter_Init(string gamemode)
+{
+ file.gamemode = gamemode
+
AddCallback_OnRegisteringCustomNetworkVars( RegisterSharedNetwork )
}
void function RegisterSharedNetwork()
{
+ if ( GAMETYPE != file.gamemode )
+ return
+
RegisterNetworkedVariable( "gunGameLevelPercentage", SNDC_PLAYER_EXCLUSIVE, SNVT_FLOAT_RANGE, 0.0, 0.0, 1.0 )
Remote_RegisterFunction( "ServerCallback_GGEarnMeter_SetWeaponIcon" )
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut
index 42d264d93..477f328a5 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut
@@ -19,8 +19,7 @@ void function Sh_GamemodeGG_Init()
// create custom gamemode
AddCallback_OnCustomGamemodesInit( CreateGamemodeGG )
- if ( GAMETYPE != GAMEMODE_GG )
- Sh_GGEarnMeter_Init()
+ Sh_GGEarnMeter_Init(GAMEMODE_GG)
}
void function CreateGamemodeGG()