more fixes for gun

pull/17/head
Edo 2023-12-31 14:05:22 +01:00 committed by GitHub
parent 9696e39099
commit 9576031f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -115,7 +115,7 @@ onStartGameType()
allowed = []; allowed = [];
maps\mp\gametypes\_gameobjects::main(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_classchange", 0 );
setdvar( "ui_allow_teamchange", 0 ); setdvar( "ui_allow_teamchange", 0 );
@ -382,6 +382,8 @@ refillSingleCountAmmo()
initGunHUD() initGunHUD()
{ {
if ( self isTestClient() ) return;
self.gun_progressDisplay[0] = self createFontString( "small", 1.6 ); self.gun_progressDisplay[0] = self createFontString( "small", 1.6 );
self.gun_progressDisplay[0] setPoint( "TOP LEFT", "TOP LEFT", 115, 5 ); self.gun_progressDisplay[0] setPoint( "TOP LEFT", "TOP LEFT", 115, 5 );
self.gun_progressDisplay[0] setText( &"MP_WEAPON" ); self.gun_progressDisplay[0] setText( &"MP_WEAPON" );
@ -402,11 +404,14 @@ initGunHUD()
updateGunHUD() updateGunHUD()
{ {
if ( self isTestClient() ) return;
self.gun_progressDisplay[1] setText( (self.gunGameGunIndex+1) + " / " + level.gun_guns.size ); self.gun_progressDisplay[1] setText( (self.gunGameGunIndex+1) + " / " + level.gun_guns.size );
} }
hideInKillCam() hideInKillCam()
{ {
if ( self isTestClient() ) return;
self endon( "disconnect" ); self endon( "disconnect" );
var_0 = 1; var_0 = 1;
@ -431,6 +436,8 @@ hideInKillCam()
hideOnGameEnd() hideOnGameEnd()
{ {
if ( self isTestClient() ) return;
self endon( "disconnect" ); self endon( "disconnect" );
level waittill( "game_ended" ); 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 // 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. // just for character model and announcer voice variety. Same loadout for both.
level.gun_loadouts["allies"] = level.gun_loadouts["axis"]; level.gun_loadouts["allies"] = level.gun_loadouts["axis"];
} }