From eeae412f6d57924c2d48e38a816d4125b86d5cb7 Mon Sep 17 00:00:00 2001 From: JezuzLizard Date: Thu, 25 Feb 2021 15:17:52 -0800 Subject: [PATCH] Numerous minor fixes. --- patch_mp/maps/mp/bots/_bot.gsc | 24 +++++++------- patch_mp/maps/mp/gametypes/_killcam.gsc | 4 +-- patch_mp/maps/mp/gametypes/dom.gsc | 3 +- .../maps/mp/gametypes_zm/_zm_gametype.gsc | 2 +- patch_zm/maps/mp/zombies/_zm_laststand.gsc | 2 +- patch_zm/maps/mp/zombies/_zm_perks.gsc | 11 +------ patch_zm/maps/mp/zombies/_zm_powerups.gsc | 31 ------------------- .../maps/mp/zm_highrise_gamemodes.gsc | 3 +- .../maps/mp/zombies/_zm_ai_leaper.gsc | 1 + zm_nuked_patch/maps/mp/zm_nuked_gamemodes.gsc | 7 +++-- .../maps/mp/zm_alcatraz_weap_quest.gsc | 2 ++ zm_prison_patch/maps/mp/zm_prison.gsc | 4 ++- zm_tomb_patch/maps/mp/zm_tomb.gsc | 2 +- zm_tomb_patch/maps/mp/zm_tomb_challenges.gsc | 2 +- zm_tomb_patch/maps/mp/zm_tomb_classic.gsc | 2 +- zm_tomb_patch/maps/mp/zm_tomb_gamemodes.gsc | 2 +- 16 files changed, 34 insertions(+), 68 deletions(-) diff --git a/patch_mp/maps/mp/bots/_bot.gsc b/patch_mp/maps/mp/bots/_bot.gsc index 113062b..d3e82a5 100644 --- a/patch_mp/maps/mp/bots/_bot.gsc +++ b/patch_mp/maps/mp/bots/_bot.gsc @@ -1946,18 +1946,18 @@ bot_update_killstreak() //checked partially changed to match cerberus output see case "killstreak_rcbomb": case "killstreak_remote_mortar": return; - case "killstreak_remote_missile": - if ( ( time - self.spawntime ) < 6000 ) - { - self switchtoweapon( weapons[ i ] ); - self waittill( "weapon_change_complete" ); - wait 1.5; - self pressattackbutton(); - } - return; - default: - self switchtoweapon( weapons[ i ] ); - break; + case "killstreak_remote_missile": + if ( ( time - self.spawntime ) < 6000 ) + { + self switchtoweapon( weapons[ i ] ); + self waittill( "weapon_change_complete" ); + wait 1.5; + self pressattackbutton(); + } + return; + default: + self switchtoweapon( weapons[ i ] ); + break; } } diff --git a/patch_mp/maps/mp/gametypes/_killcam.gsc b/patch_mp/maps/mp/gametypes/_killcam.gsc index 1c9d327..eadf209 100644 --- a/patch_mp/maps/mp/gametypes/_killcam.gsc +++ b/patch_mp/maps/mp/gametypes/_killcam.gsc @@ -197,7 +197,7 @@ killcam( attackernum, targetnum, killcamentity, killcamentityindex, killcamentit killcamlength = camtime + postdelay; } killcamoffset = camtime + predelay; - self notify( "begin_killcam" ); + self notify( "begin_killcam", getTime() ); killcamstarttime = getTime() - ( killcamoffset * 1000 ); self.sessionstate = "spectator"; self.spectatorclient = attackernum; @@ -497,7 +497,7 @@ finalkillcam( winner ) //checked changed to match cerberus output killcamoffset = camtime + predelay; killcamlength = ( camtime + postdelay ) - 0.05; killcamstarttime = getTime() - ( killcamoffset * 1000 ); - self notify( "begin_killcam" ); + self notify( "begin_killcam", getTime() ); self.sessionstate = "spectator"; self.spectatorclient = killcamsettings.spectatorclient; self.killcamentity = -1; diff --git a/patch_mp/maps/mp/gametypes/dom.gsc b/patch_mp/maps/mp/gametypes/dom.gsc index 0a49a3f..d19c187 100644 --- a/patch_mp/maps/mp/gametypes/dom.gsc +++ b/patch_mp/maps/mp/gametypes/dom.gsc @@ -326,7 +326,7 @@ domflags() //checked changed to match cerberus output tracestart = visuals[ 0 ].origin + vectorScale( ( 0, 0, 1 ), 32 ); traceend = visuals[ 0 ].origin + vectorScale( ( 0, 0, -1 ), 32 ); trace = bullettrace( tracestart, traceend, 0, undefined ); - upangles = vectorToAngle( trace[ "normal" ] ); + upangles = vectorToAngles( trace[ "normal" ] ); domflag.baseeffectforward = anglesToForward( upangles ); domflag.baseeffectright = anglesToRight( upangles ); domflag.baseeffectpos = trace[ "position" ]; @@ -613,7 +613,6 @@ onuse( player ) //checked changed to match cerberus output } self update_spawn_influencers( team ); level change_dom_spawns(); - } } totaldomination( team ) //checked matches cerberus output diff --git a/patch_zm/maps/mp/gametypes_zm/_zm_gametype.gsc b/patch_zm/maps/mp/gametypes_zm/_zm_gametype.gsc index 3e8bd7c..aeba556 100644 --- a/patch_zm/maps/mp/gametypes_zm/_zm_gametype.gsc +++ b/patch_zm/maps/mp/gametypes_zm/_zm_gametype.gsc @@ -517,7 +517,7 @@ round_logic( mode_logic_func ) //checked matches cerberus output set_gamemode_var_once( "current_round", 0 ); set_gamemode_var_once( "team_1_score", 0 ); set_gamemode_var_once( "team_2_score", 0 ); - if ( isDefined( is_encounter() ) && is_encounter() ) + if ( is_true( is_encounter() ) ) { [[ level._setteamscore ]]( "allies", get_gamemode_var( "team_2_score" ) ); [[ level._setteamscore ]]( "axis", get_gamemode_var( "team_1_score" ) ); diff --git a/patch_zm/maps/mp/zombies/_zm_laststand.gsc b/patch_zm/maps/mp/zombies/_zm_laststand.gsc index c8dd30d..52d147a 100644 --- a/patch_zm/maps/mp/zombies/_zm_laststand.gsc +++ b/patch_zm/maps/mp/zombies/_zm_laststand.gsc @@ -175,7 +175,7 @@ playerlaststand( einflictor, attacker, idamage, smeansofdeath, sweapon, vdir, sh { return; } - if ( isDefined( self.in_zombify_call ) && self.in_zombify_call ) + if ( is_true( self.in_zombify_call ) ) { return; } diff --git a/patch_zm/maps/mp/zombies/_zm_perks.gsc b/patch_zm/maps/mp/zombies/_zm_perks.gsc index 7ab7cde..fc9c614 100644 --- a/patch_zm/maps/mp/zombies/_zm_perks.gsc +++ b/patch_zm/maps/mp/zombies/_zm_perks.gsc @@ -16,15 +16,6 @@ init() //checked partially changed to match cerberus output { - //begin debug code - level.custom_zm_perks_loaded = 1; - maps/mp/zombies/_zm_bot::init(); - if ( !isDefined( level.debugLogging_zm_perks ) ) - { - level.debugLogging_zm_perks = 0; - } - - //end debug code level.additionalprimaryweapon_limit = 3; level.perk_purchase_limit = 4; if ( !level.createfx_enabled ) @@ -2911,7 +2902,7 @@ perk_machine_removal( machine, replacement_model ) //checked changed to match ce { if ( isdefined( parts[ i ].classname ) && parts[ i ].classname == "script_model" ) { - machine_model = parts[i]; + machine_model = parts[ i ]; } if ( isdefined( parts[ i ].script_noteworthy ) && parts[ i ].script_noteworthy == "clip" ) { diff --git a/patch_zm/maps/mp/zombies/_zm_powerups.gsc b/patch_zm/maps/mp/zombies/_zm_powerups.gsc index 123171b..dda66fe 100644 --- a/patch_zm/maps/mp/zombies/_zm_powerups.gsc +++ b/patch_zm/maps/mp/zombies/_zm_powerups.gsc @@ -22,19 +22,6 @@ init() //checked matches cerberus output { - //begin debug code - level.custom_zm_powerups_loaded = 1; - maps/mp/zombies/_zm_bot::init(); - if ( !isDefined( level.debugLogging_zm_powerups ) ) - { - level.debugLogging_zm_powerups = 0; - } - if ( level.debugLogging_zm_powerups ) - { - level.zombiesAlwaysDropPowerups = getDvarIntDefault( "zombiesAlwaysDropPowerups", 0 ); - thread zombies_always_drop_powerups(); - } - //end debug code precacheshader( "specialty_doublepoints_zombies" ); precacheshader( "specialty_instakill_zombies" ); precacheshader( "specialty_firesale_zombies" ); @@ -56,11 +43,6 @@ init() //checked matches cerberus output set_zombie_var( "zombie_powerup_point_doubler_time", 30, undefined, undefined, 1 ); set_zombie_var( "zombie_powerup_drop_increment", 2000 ); set_zombie_var( "zombie_powerup_drop_max_per_round", 4 ); - if ( level.debugLogging_zm_powerups ) - { - level.maxPowerupsPerRound = getDvarIntDefault( "maxPowerupsPerRound", 4 ); - level.zombie_vars["zombie_powerup_drop_max_per_round"] = level.maxPowerupsPerRound; - } onplayerconnect_callback( ::init_player_zombie_vars ); level._effect[ "powerup_on" ] = loadfx( "misc/fx_zombie_powerup_on" ); level._effect[ "powerup_off" ] = loadfx( "misc/fx_zombie_powerup_off" ); @@ -2874,19 +2856,6 @@ teller_withdrawl( powerup, player ) //checked matches cerberus output player maps/mp/zombies/_zm_score::add_to_player_score( powerup.value ); } -zombies_always_drop_powerups() //debug code added -{ - if ( !level.zombiesAlwaysDropPowerups ) - { - return; - } - while ( 1 ) - { - level.zombie_vars[ "zombie_drop_item" ] = level.zombiesAlwaysDropPowerups; - wait 0.05; - } -} - diff --git a/zm_highrise_patch/maps/mp/zm_highrise_gamemodes.gsc b/zm_highrise_patch/maps/mp/zm_highrise_gamemodes.gsc index 5035ac2..dcfc4ee 100644 --- a/zm_highrise_patch/maps/mp/zm_highrise_gamemodes.gsc +++ b/zm_highrise_patch/maps/mp/zm_highrise_gamemodes.gsc @@ -1,3 +1,4 @@ +//checked includes match cerberus output #include maps/mp/zm_highrise_classic; #include maps/mp/zm_highrise; #include maps/mp/gametypes_zm/_zm_gametype; @@ -6,7 +7,7 @@ #include maps/mp/_utility; #include common_scripts/utility; -init() +init() //checked matches cerberus output { add_map_gamemode( "zclassic", maps/mp/zm_highrise::zclassic_preinit, undefined, undefined ); add_map_location_gamemode( "zclassic", "rooftop", maps/mp/zm_highrise_classic::precache, maps/mp/zm_highrise_classic::main ); diff --git a/zm_highrise_patch/maps/mp/zombies/_zm_ai_leaper.gsc b/zm_highrise_patch/maps/mp/zombies/_zm_ai_leaper.gsc index cc76bd8..0d2e63d 100644 --- a/zm_highrise_patch/maps/mp/zombies/_zm_ai_leaper.gsc +++ b/zm_highrise_patch/maps/mp/zombies/_zm_ai_leaper.gsc @@ -663,6 +663,7 @@ leaper_round_spawning() //checked changed to match cerberus output if ( ( level.leaper_count >= max ) && b_hold_spawning_when_leapers_are_all_dead ) { wait 0.5; + continue; } num_player_valid = get_number_of_valid_players(); per_player = 2; diff --git a/zm_nuked_patch/maps/mp/zm_nuked_gamemodes.gsc b/zm_nuked_patch/maps/mp/zm_nuked_gamemodes.gsc index 67c69e9..ee3f5d4 100644 --- a/zm_nuked_patch/maps/mp/zm_nuked_gamemodes.gsc +++ b/zm_nuked_patch/maps/mp/zm_nuked_gamemodes.gsc @@ -1,3 +1,4 @@ +//checked includes match cerberus output #include maps/mp/zm_nuked_standard; #include maps/mp/zm_nuked; #include maps/mp/gametypes_zm/_zm_gametype; @@ -6,8 +7,8 @@ #include maps/mp/_utility; #include common_scripts/utility; -init() +init() //checked matches cerberus output { - add_map_gamemode( "zstandard", ::maps/mp/zm_nuked::zstandard_preinit, undefined, undefined ); - add_map_location_gamemode( "zstandard", "nuked", ::maps/mp/zm_nuked_standard::precache, ::maps/mp/zm_nuked_standard::main ); + add_map_gamemode( "zstandard", maps/mp/zm_nuked::zstandard_preinit, undefined, undefined ); + add_map_location_gamemode( "zstandard", "nuked", maps/mp/zm_nuked_standard::precache, maps/mp/zm_nuked_standard::main ); } diff --git a/zm_prison_patch/maps/mp/zm_alcatraz_weap_quest.gsc b/zm_prison_patch/maps/mp/zm_alcatraz_weap_quest.gsc index 9699f3f..70c497e 100644 --- a/zm_prison_patch/maps/mp/zm_alcatraz_weap_quest.gsc +++ b/zm_prison_patch/maps/mp/zm_alcatraz_weap_quest.gsc @@ -10,6 +10,8 @@ #include maps/mp/_utility; #include common_scripts/utility; +//#using_animtree( "fxanim_props" ); //leave commented for now for compiling + init() //checked changed to match cerberus output { flag_init( "soul_catchers_charged" ); diff --git a/zm_prison_patch/maps/mp/zm_prison.gsc b/zm_prison_patch/maps/mp/zm_prison.gsc index 43e25fa..5287965 100644 --- a/zm_prison_patch/maps/mp/zm_prison.gsc +++ b/zm_prison_patch/maps/mp/zm_prison.gsc @@ -37,6 +37,8 @@ #include maps/mp/_utility; #include common_scripts/utility; +//#using_animtree( "fxanim_props" ); //leave commented out for now for compiling + gamemode_callback_setup() //checked matches cerberus output { maps/mp/zm_alcatraz_gamemodes::init(); @@ -564,7 +566,7 @@ assign_lowest_unused_character_index() //checked changed to match cerberus outpu { if ( n_characters_defined == ( players.size - 1 ) ) { - if ( isDefined( level.has_weasel ) && !level.has_weasel ) + if ( !is_true( level.has_weasel ) ) { level.has_weasel = 1; return 3; diff --git a/zm_tomb_patch/maps/mp/zm_tomb.gsc b/zm_tomb_patch/maps/mp/zm_tomb.gsc index ee1c234..ced2203 100644 --- a/zm_tomb_patch/maps/mp/zm_tomb.gsc +++ b/zm_tomb_patch/maps/mp/zm_tomb.gsc @@ -804,7 +804,7 @@ assign_lowest_unused_character_index() //checked changed to match cerberus outpu { if ( n_characters_defined == ( players.size - 1 ) ) { - if ( isDefined( level.has_richtofen ) && !level.has_richtofen ) + if ( !is_true( level.has_richtofen ) ) { level.has_richtofen = 1; return 2; diff --git a/zm_tomb_patch/maps/mp/zm_tomb_challenges.gsc b/zm_tomb_patch/maps/mp/zm_tomb_challenges.gsc index c2a2efa..66ec5e9 100644 --- a/zm_tomb_patch/maps/mp/zm_tomb_challenges.gsc +++ b/zm_tomb_patch/maps/mp/zm_tomb_challenges.gsc @@ -294,7 +294,7 @@ reward_double_tap( player, s_stat ) //checked matches cerberus output str_model = getweaponmodel( "zombie_perk_bottle_doubletap" ); m_reward setmodel( str_model ); m_reward playsound( "zmb_spawn_powerup" ); - m_reward playloopsound( "zmb_spawn_powerup_loop", 0,5 ); + m_reward playloopsound( "zmb_spawn_powerup_loop", 0.5 ); wait_network_frame(); if ( !reward_rise_and_grab( m_reward, 50, 2, 2, 10 ) ) { diff --git a/zm_tomb_patch/maps/mp/zm_tomb_classic.gsc b/zm_tomb_patch/maps/mp/zm_tomb_classic.gsc index 2ce2d62..212e015 100644 --- a/zm_tomb_patch/maps/mp/zm_tomb_classic.gsc +++ b/zm_tomb_patch/maps/mp/zm_tomb_classic.gsc @@ -10,7 +10,7 @@ precache() //checked matches cerberus output { - if ( isDefined( level.createfx_enabled ) && level.createfx_enabled ) + if ( is_true( level.createfx_enabled ) ) { return; } diff --git a/zm_tomb_patch/maps/mp/zm_tomb_gamemodes.gsc b/zm_tomb_patch/maps/mp/zm_tomb_gamemodes.gsc index 4942cd9..5912656 100644 --- a/zm_tomb_patch/maps/mp/zm_tomb_gamemodes.gsc +++ b/zm_tomb_patch/maps/mp/zm_tomb_gamemodes.gsc @@ -10,5 +10,5 @@ init() //checked matches cerberus output { add_map_gamemode( "zclassic", maps/mp/zm_tomb::zstandard_preinit, undefined, undefined ); - add_map_location_gamemode( "zclassic", "tomb", maps/mp/zm_tomb_classic::precache, ::maps/mp/zm_tomb_classic::main ); + add_map_location_gamemode( "zclassic", "tomb", maps/mp/zm_tomb_classic::precache, maps/mp/zm_tomb_classic::main ); }