From 351039652be5cbaf160db60022078c50ca2807e3 Mon Sep 17 00:00:00 2001 From: Rim Date: Tue, 28 May 2024 15:58:17 -0400 Subject: [PATCH] maint: cleanup code --- scripts/zm/_load.gsc | 11 ++++++----- scripts/zm/gametypes/_clientids.gsc | 20 +++++++++----------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/scripts/zm/_load.gsc b/scripts/zm/_load.gsc index 52750e6..5bafa84 100644 --- a/scripts/zm/_load.gsc +++ b/scripts/zm/_load.gsc @@ -86,7 +86,7 @@ function main() level.vehicleTriggerSpawnFlags = getvehicletriggerflags(); level thread start_intro_screen_zm(); - + //thread _spawning::init(); //thread _deployable_weapons::init(); //thread _minefields::init(); @@ -100,15 +100,16 @@ function main() setup_traversals(); - footsteps(); - + footsteps(); + system::wait_till( "all" ); level thread load::art_review(); + + level flagsys::set( "load_main_complete" ); + SetDvar("scr_firstGumFree",1); // First GobbleGum free SetDvar("zm_private_rankedmatch",1); // Ranked private match - - level flagsys::set( "load_main_complete" ); } function footsteps() diff --git a/scripts/zm/gametypes/_clientids.gsc b/scripts/zm/gametypes/_clientids.gsc index 509c4df..132e20d 100644 --- a/scripts/zm/gametypes/_clientids.gsc +++ b/scripts/zm/gametypes/_clientids.gsc @@ -4,8 +4,7 @@ #using scripts\shared\system_shared; #using scripts\shared\flag_shared; -#using scripts\shared\array_shared; -#using scripts\zm\_zm_perks; +// #using scripts\shared\array_shared; #insert scripts\shared\shared.gsh; @@ -17,20 +16,20 @@ function __init__() { callback::on_start_gametype( &init ); callback::on_connect( &on_player_connect ); - // callback::on_spawned( &on_player_spawned ); // Spawn message function + // callback::on_spawned( &on_player_spawned ); // Call message function on init } function init() { - // this is now handled in code ( not lan ) - // see s_nextScriptClientId + // This is now handled in code ( not lan ) + // See s_nextScriptClientId level.clientid = 0; // Set Client Dvars SetDvar("r_fog", "0"); // Disable fog SetDvar("r_dof_enable", "0"); // Disable depth of field SetDvar("r_lodbiasrigid", "-1000"); // Increase draw distance SetDvar("r_modellodbias", "10"); // Increase model draw distance - level.perk_purchase_limit = 25; // Remove perk limit on most maps + level.perk_purchase_limit = 50; // Remove perk limit on most maps // level.player_starting_points = 500000; // DEBUG: Set player starting points } @@ -40,20 +39,19 @@ function on_player_connect() if ( !isdefined( self.clientid ) || self.clientid == -1 ) { self.clientid = level.clientid; - level.clientid++; // Is this safe? What if a server runs for a long time and many people join/leave + level.clientid++; // Is this safe? What if a server runs for a long time and many people join/leave } - } +/* function on_player_spawned() { // Spawn Message level flag::wait_till("initial_blackscreen_passed"); self iPrintLnBold("Follow ^2@thahrimdon ^7on ^1YouTube ^7& ^6Twitch^7!"); - //self thread print(); // Print message on knife + self thread print(); // Print message on knife } -/* function print() { for(;;) @@ -66,4 +64,4 @@ function print() wait 0.05; } } -*/ \ No newline at end of file +*/