From 9576031f63181e761b3050c96da0da07b7781a16 Mon Sep 17 00:00:00 2001 From: Edo Date: Sun, 31 Dec 2023 14:05:22 +0100 Subject: [PATCH] more fixes for gun --- iw4x/iw4x_00/maps/mp/gametypes/gun.gsc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/iw4x/iw4x_00/maps/mp/gametypes/gun.gsc b/iw4x/iw4x_00/maps/mp/gametypes/gun.gsc index cd20610..3f20b18 100644 --- a/iw4x/iw4x_00/maps/mp/gametypes/gun.gsc +++ b/iw4x/iw4x_00/maps/mp/gametypes/gun.gsc @@ -115,7 +115,7 @@ onStartGameType() allowed = []; maps\mp\gametypes\_gameobjects::main(allowed); - // Prevent class and team change + // Prevent class and team change. TODO: Must be disabled in _menus.gsc as well setDvar( "ui_allow_classchange", 0 ); setdvar( "ui_allow_teamchange", 0 ); @@ -382,6 +382,8 @@ refillSingleCountAmmo() initGunHUD() { + if ( self isTestClient() ) return; + self.gun_progressDisplay[0] = self createFontString( "small", 1.6 ); self.gun_progressDisplay[0] setPoint( "TOP LEFT", "TOP LEFT", 115, 5 ); self.gun_progressDisplay[0] setText( &"MP_WEAPON" ); @@ -402,11 +404,14 @@ initGunHUD() updateGunHUD() { + if ( self isTestClient() ) return; self.gun_progressDisplay[1] setText( (self.gunGameGunIndex+1) + " / " + level.gun_guns.size ); } hideInKillCam() { + if ( self isTestClient() ) return; + self endon( "disconnect" ); var_0 = 1; @@ -431,6 +436,8 @@ hideInKillCam() hideOnGameEnd() { + if ( self isTestClient() ) return; + self endon( "disconnect" ); level waittill( "game_ended" ); @@ -574,4 +581,4 @@ setSpecialLoadout() // FFA games don't have teams, but players are allowed to choose team on the way in // just for character model and announcer voice variety. Same loadout for both. level.gun_loadouts["allies"] = level.gun_loadouts["axis"]; -} \ No newline at end of file +}