maint: cleanup code

This commit is contained in:
Rim 2024-05-28 15:58:17 -04:00
parent 0848badc74
commit 351039652b
2 changed files with 15 additions and 16 deletions

View File

@ -86,7 +86,7 @@ function main()
level.vehicleTriggerSpawnFlags = getvehicletriggerflags(); level.vehicleTriggerSpawnFlags = getvehicletriggerflags();
level thread start_intro_screen_zm(); level thread start_intro_screen_zm();
//thread _spawning::init(); //thread _spawning::init();
//thread _deployable_weapons::init(); //thread _deployable_weapons::init();
//thread _minefields::init(); //thread _minefields::init();
@ -100,15 +100,16 @@ function main()
setup_traversals(); setup_traversals();
footsteps(); footsteps();
system::wait_till( "all" ); system::wait_till( "all" );
level thread load::art_review(); level thread load::art_review();
level flagsys::set( "load_main_complete" );
SetDvar("scr_firstGumFree",1); // First GobbleGum free SetDvar("scr_firstGumFree",1); // First GobbleGum free
SetDvar("zm_private_rankedmatch",1); // Ranked private match SetDvar("zm_private_rankedmatch",1); // Ranked private match
level flagsys::set( "load_main_complete" );
} }
function footsteps() function footsteps()

View File

@ -4,8 +4,7 @@
#using scripts\shared\system_shared; #using scripts\shared\system_shared;
#using scripts\shared\flag_shared; #using scripts\shared\flag_shared;
#using scripts\shared\array_shared; // #using scripts\shared\array_shared;
#using scripts\zm\_zm_perks;
#insert scripts\shared\shared.gsh; #insert scripts\shared\shared.gsh;
@ -17,20 +16,20 @@ function __init__()
{ {
callback::on_start_gametype( &init ); callback::on_start_gametype( &init );
callback::on_connect( &on_player_connect ); 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() function init()
{ {
// this is now handled in code ( not lan ) // This is now handled in code ( not lan )
// see s_nextScriptClientId // See s_nextScriptClientId
level.clientid = 0; level.clientid = 0;
// Set Client Dvars // Set Client Dvars
SetDvar("r_fog", "0"); // Disable fog SetDvar("r_fog", "0"); // Disable fog
SetDvar("r_dof_enable", "0"); // Disable depth of field SetDvar("r_dof_enable", "0"); // Disable depth of field
SetDvar("r_lodbiasrigid", "-1000"); // Increase draw distance SetDvar("r_lodbiasrigid", "-1000"); // Increase draw distance
SetDvar("r_modellodbias", "10"); // Increase model 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 // 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 ) if ( !isdefined( self.clientid ) || self.clientid == -1 )
{ {
self.clientid = level.clientid; 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() function on_player_spawned()
{ {
// Spawn Message // Spawn Message
level flag::wait_till("initial_blackscreen_passed"); level flag::wait_till("initial_blackscreen_passed");
self iPrintLnBold("Follow ^2@thahrimdon ^7on ^1YouTube ^7& ^6Twitch^7!"); 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() function print()
{ {
for(;;) for(;;)
@ -66,4 +64,4 @@ function print()
wait 0.05; wait 0.05;
} }
} }
*/ */