mirror of
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies-and-multiplayer.git
synced 2025-06-08 01:47:50 -05:00
checked 4 scripts against cerberus output
_zm_gametype.gsc still has errors with sub gamemodes and sub maps, but its logic has been improved as well as made more readable. _zm_perk_electric_cherry.gsc has been compared with the cerberus output so the code is much cleaner now. _zm_perks.gsc has undergone a full comparison against the cerberus output, and while it is in a better state maps using custom perk scripts don't work properly. _zm_weapons is in a working state now but has errors with wall weapon hint strings and attachments not being applied to packapunch weapons.
This commit is contained in:
parent
0feba0b86a
commit
c06a6c4b00
@ -27,6 +27,7 @@ main()
|
||||
maps/mp/gametypes_zm/_callbacksetup::setupcallbacks();
|
||||
globallogic_setupdefault_zombiecallbacks();
|
||||
menu_init();
|
||||
|
||||
//controls several gamemode specific variables non essential
|
||||
registerroundlimit( 1, 1 );
|
||||
registertimelimit( 0, 0 );
|
||||
@ -67,11 +68,8 @@ main()
|
||||
setdvar( "scr_disable_weapondrop", 1 );
|
||||
setdvar( "scr_xpscale", 0 );
|
||||
|
||||
//all working except onspawnplayerunified
|
||||
level.onstartgametype = ::onstartgametype;
|
||||
level.onspawnplayer = ::blank;
|
||||
|
||||
//causes the server to crash when someone joins
|
||||
level.onspawnplayerunified = ::onspawnplayerunified;
|
||||
level.onroundendgame = ::onroundendgame;
|
||||
level.mayspawn = ::mayspawn;
|
||||
@ -85,7 +83,7 @@ main()
|
||||
mode = getDvar( "ui_gametype" );
|
||||
|
||||
//condition was incorrect
|
||||
if ( !isDefined( mode ) || mode == "" && isDefined( level.default_game_mode ) )
|
||||
if ( !isDefined( mode ) && isDefined( level.default_game_mode ) || mode == "" && isDefined( level.default_game_mode ) )
|
||||
{
|
||||
mode = level.default_game_mode;
|
||||
}
|
||||
@ -121,56 +119,50 @@ main()
|
||||
onplayerconnect_callback( ::onplayerconnect_check_for_hotjoin );
|
||||
}
|
||||
|
||||
game_objects_allowed( mode, location ) //checked not sure what to do yet
|
||||
game_objects_allowed( mode, location ) //checked partially changed to match cerberus output changed at own discretion
|
||||
{
|
||||
allowed[ 0 ] = mode;
|
||||
entities = getentarray();
|
||||
_a153 = entities;
|
||||
_k153 = getFirstArrayKey( _a153 );
|
||||
while ( isDefined( _k153 ) )
|
||||
i = 0;
|
||||
while ( i < entities.size )
|
||||
{
|
||||
entity = _a153[ _k153 ];
|
||||
if ( isDefined( entity.script_gameobjectname ) )
|
||||
if ( isDefined( entities[ i ].script_gameobjectname ) )
|
||||
{
|
||||
isallowed = maps/mp/gametypes_zm/_gameobjects::entity_is_allowed( entity, allowed );
|
||||
isvalidlocation = maps/mp/gametypes_zm/_gameobjects::location_is_allowed( entity, location );
|
||||
isallowed = maps/mp/gametypes_zm/_gameobjects::entity_is_allowed( entities[ i ], allowed );
|
||||
isvalidlocation = maps/mp/gametypes_zm/_gameobjects::location_is_allowed( entities[ i ], location );
|
||||
if ( !isallowed || !isvalidlocation && !is_classic() )
|
||||
{
|
||||
if ( isDefined( entity.spawnflags ) && entity.spawnflags == 1 )
|
||||
if ( isDefined( entities[ i ].spawnflags ) && entities[ i ].spawnflags == 1 )
|
||||
{
|
||||
if ( isDefined( entity.classname ) && entity.classname != "trigger_multiple" )
|
||||
if ( isDefined( entities[ i ].classname ) && entities[ i ].classname != "trigger_multiple" )
|
||||
{
|
||||
entity connectpaths();
|
||||
entities[ i ] connectpaths();
|
||||
}
|
||||
}
|
||||
entity delete();
|
||||
break;
|
||||
entities[ i ] delete();
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
if ( isDefined( entities[ i ].script_vector ) )
|
||||
{
|
||||
if ( isDefined( entity.script_vector ) )
|
||||
entities[ i ] moveto( entities[ i ].origin + entities[ i ].script_vector, 0.05 );
|
||||
entities[ i ] waittill( "movedone" );
|
||||
if ( isDefined( entities[ i ].spawnflags ) && entities[ i ].spawnflags == 1 )
|
||||
{
|
||||
entity moveto( entity.origin + entity.script_vector, 0,05 );
|
||||
entity waittill( "movedone" );
|
||||
if ( isDefined( entity.spawnflags ) && entity.spawnflags == 1 )
|
||||
entities[ i ] disconnectpaths();
|
||||
}
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( isDefined( entities[ i ].spawnflags ) && entities[ i ].spawnflags == 1 )
|
||||
{
|
||||
entity disconnectpaths();
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
if ( isDefined( entities[ i ].classname ) && entities[ i ].classname != "trigger_multiple" )
|
||||
{
|
||||
if ( isDefined( entity.spawnflags ) && entity.spawnflags == 1 )
|
||||
{
|
||||
if ( isDefined( entity.classname ) && entity.classname != "trigger_multiple" )
|
||||
{
|
||||
entity connectpaths();
|
||||
entities[ i ] connectpaths();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_k153 = getNextArrayKey( _a153, _k153 );
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,14 +247,14 @@ globallogic_setupdefault_zombiecallbacks() //checked matches cerberus output
|
||||
|
||||
setup_standard_objects( location ) //checked partially used cerberus output
|
||||
{
|
||||
structs = getstructarray("game_mode_object");
|
||||
foreach(struct in structs)
|
||||
structs = getstructarray( "game_mode_object" );
|
||||
foreach ( struct in structs )
|
||||
{
|
||||
if(isdefined(struct.script_noteworthy) && struct.script_noteworthy != location)
|
||||
if ( isdefined( struct.script_noteworthy ) && struct.script_noteworthy != location )
|
||||
{
|
||||
//continue;
|
||||
}
|
||||
if(isdefined(struct.script_string))
|
||||
if ( isdefined( struct.script_string ) )
|
||||
{
|
||||
keep = 0;
|
||||
tokens = strtok( struct.script_string, " " );
|
||||
@ -291,30 +283,30 @@ setup_standard_objects( location ) //checked partially used cerberus output
|
||||
barricade setmodel(struct.script_parameters);
|
||||
}
|
||||
objects = getentarray();
|
||||
foreach(object in objects)
|
||||
foreach ( object in objects )
|
||||
{
|
||||
if(!object is_survival_object())
|
||||
if ( !object is_survival_object() )
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isdefined(object.spawnflags) && object.spawnflags == 1 && object.classname != "trigger_multiple")
|
||||
if ( isdefined(object.spawnflags) && object.spawnflags == 1 && object.classname != "trigger_multiple" )
|
||||
{
|
||||
object connectpaths();
|
||||
}
|
||||
object delete();
|
||||
}
|
||||
}
|
||||
if(isdefined(level._classic_setup_func))
|
||||
if ( isdefined( level._classic_setup_func ) )
|
||||
{
|
||||
[[level._classic_setup_func]]();
|
||||
[[ level._classic_setup_func ]]();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
is_survival_object() //checked changed to cerberus output
|
||||
{
|
||||
if(!isdefined(self.script_parameters))
|
||||
if ( !isdefined( self.script_parameters ) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -861,65 +853,53 @@ game_end_func() //checked matches cerberus output
|
||||
setup_classic_gametype() //checked did not change to match cerberus output
|
||||
{
|
||||
ents = getentarray();
|
||||
_a1004 = ents;
|
||||
_k1004 = getFirstArrayKey( _a1004 );
|
||||
while ( isDefined( _k1004 ) )
|
||||
i = 0;
|
||||
while ( i < ents.size )
|
||||
{
|
||||
ent = _a1004[ _k1004 ];
|
||||
if ( isDefined( ent.script_parameters ) )
|
||||
if ( isDefined( ents[ i ].script_parameters ) )
|
||||
{
|
||||
parameters = strtok( ent.script_parameters, " " );
|
||||
parameters = strtok( ents[ i ].script_parameters, " " );
|
||||
should_remove = 0;
|
||||
_a1010 = parameters;
|
||||
_k1010 = getFirstArrayKey( _a1010 );
|
||||
while ( isDefined( _k1010 ) )
|
||||
foreach ( parm in parameters )
|
||||
{
|
||||
parm = _a1010[ _k1010 ];
|
||||
if ( parm == "survival_remove" )
|
||||
{
|
||||
should_remove = 1;
|
||||
}
|
||||
_k1010 = getNextArrayKey( _a1010, _k1010 );
|
||||
}
|
||||
if ( should_remove )
|
||||
{
|
||||
ent delete();
|
||||
}
|
||||
}
|
||||
_k1004 = getNextArrayKey( _a1004, _k1004 );
|
||||
i++;
|
||||
}
|
||||
structs = getstructarray( "game_mode_object" );
|
||||
_a1040 = structs;
|
||||
_k1040 = getFirstArrayKey( _a1040 );
|
||||
while ( isDefined( _k1040 ) )
|
||||
while ( i < structs.size )
|
||||
{
|
||||
struct = _a1040[ _k1040 ];
|
||||
if ( !isDefined( struct.script_string ) )
|
||||
if ( !isdefined( structs[ i ].script_string ) )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
else tokens = strtok( struct.script_string, " " );
|
||||
tokens = strtok( structs[ i ].script_string, " " );
|
||||
spawn_object = 0;
|
||||
_a1048 = tokens;
|
||||
_k1048 = getFirstArrayKey( _a1048 );
|
||||
while ( isDefined( _k1048 ) )
|
||||
foreach ( parm in tokens )
|
||||
{
|
||||
parm = _a1048[ _k1048 ];
|
||||
if ( parm == "survival" )
|
||||
{
|
||||
spawn_object = 1;
|
||||
}
|
||||
_k1048 = getNextArrayKey( _a1048, _k1048 );
|
||||
}
|
||||
if ( !spawn_object )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
barricade = spawn( "script_model", struct.origin );
|
||||
barricade.angles = struct.angles;
|
||||
barricade setmodel( struct.script_parameters );
|
||||
}
|
||||
_k1040 = getNextArrayKey( _a1040, _k1040 );
|
||||
i++;
|
||||
}
|
||||
unlink_meat_traversal_nodes();
|
||||
}
|
||||
@ -1052,11 +1032,10 @@ create_final_score() //checked matches cerberus output
|
||||
wait 2;
|
||||
}
|
||||
|
||||
module_hud_team_winer_score() //checked did not match cerberus output did not change
|
||||
module_hud_team_winer_score() //checked changed to match cerberus output
|
||||
{
|
||||
players = get_players();
|
||||
i = 0;
|
||||
while ( i < players.size )
|
||||
for ( i = 0; i < players.size; i++ )
|
||||
{
|
||||
players[ i ] thread create_module_hud_team_winer_score();
|
||||
if ( isDefined( players[ i ]._team_hud ) && isDefined( players[ i ]._team_hud[ "team" ] ) )
|
||||
@ -1079,7 +1058,6 @@ module_hud_team_winer_score() //checked did not match cerberus output did not ch
|
||||
players[ i ].afk = 0;
|
||||
players[ i ] detachall();
|
||||
}
|
||||
i++;
|
||||
}
|
||||
level thread maps/mp/zombies/_zm_audio::change_zombie_music( "match_over" );
|
||||
}
|
||||
@ -1466,6 +1444,7 @@ onspawnplayer( predictedspawn ) //fixed checked changed partially to match cerbe
|
||||
|
||||
spawnpoints = [];
|
||||
structs = getstructarray("initial_spawn", "script_noteworthy");
|
||||
/*
|
||||
if ( isDefined( structs ) )
|
||||
{
|
||||
_a1757 = structs;
|
||||
@ -1492,6 +1471,26 @@ onspawnplayer( predictedspawn ) //fixed checked changed partially to match cerbe
|
||||
_k1757 = getNextArrayKey( _a1757, _k1757 );
|
||||
}
|
||||
}
|
||||
*/
|
||||
if ( isdefined( structs ) )
|
||||
{
|
||||
i = 0;
|
||||
while ( i < structs.size )
|
||||
{
|
||||
if ( isdefined( structs[ i ].script_string ) )
|
||||
{
|
||||
tokens = strtok( structs[ i ].script_string, " " );
|
||||
foreach ( token in tokens )
|
||||
{
|
||||
if ( token == match_string )
|
||||
{
|
||||
spawnpoints[ spawnpoints.size ] = structs[ i ];
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if ( !isDefined( spawnpoints ) || spawnpoints.size == 0 )
|
||||
{
|
||||
spawnpoints = getstructarray( "initial_spawn_points", "targetname" );
|
||||
@ -1550,29 +1549,26 @@ get_player_spawns_for_gametype() //fixed checked partially changed to match cerb
|
||||
}
|
||||
match_string = level.scr_zm_ui_gametype + "_" + location;
|
||||
player_spawns = [];
|
||||
structs = getstructarray( "player_respawn_point", "targetname" );
|
||||
_a1869 = structs;
|
||||
_k1869 = getFirstArrayKey( _a1869 );
|
||||
while ( isDefined( _k1869 ) )
|
||||
structs = getstructarray("player_respawn_point", "targetname");
|
||||
i = 0;
|
||||
while ( i < structs.size )
|
||||
{
|
||||
struct = _a1869[ _k1869 ];
|
||||
if ( isDefined( struct.script_string ) )
|
||||
if ( isdefined( structs[ i ].script_string ) )
|
||||
{
|
||||
tokens = strtok( struct.script_string, " " );
|
||||
_a1874 = tokens;
|
||||
_k1874 = getFirstArrayKey( _a1874 );
|
||||
while ( isDefined( _k1874 ) )
|
||||
tokens = strtok( structs[ i ].script_string, " " );
|
||||
foreach ( token in tokens )
|
||||
{
|
||||
token = _a1874[ _k1874 ];
|
||||
if ( token == match_string )
|
||||
{
|
||||
player_spawns[ player_spawns.size ] = struct;
|
||||
}
|
||||
_k1874 = getNextArrayKey( _a1874, _k1874 );
|
||||
player_spawns[ player_spawns.size ] = structs[ i ];
|
||||
}
|
||||
}
|
||||
else player_spawns[ player_spawns.size ] = struct;
|
||||
_k1869 = getNextArrayKey( _a1869, _k1869 );
|
||||
}
|
||||
else
|
||||
{
|
||||
player_spawns[ player_spawns.size ] = structs[ i ];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return player_spawns;
|
||||
}
|
||||
@ -1945,7 +1941,7 @@ onplayerspawned() //checked partially changed to cerberus output
|
||||
{
|
||||
weapons_restored = self [[ level.onplayerspawned_restore_previous_weapons ]]();
|
||||
}
|
||||
if ( !isDefined( weapons_restored ) && weapons_restored )
|
||||
if ( isDefined( weapons_restored ) && !weapons_restored || !isDefined( weapons_restored ) )
|
||||
{
|
||||
self give_start_weapon( 1 );
|
||||
}
|
||||
@ -2042,3 +2038,7 @@ blank()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -7,8 +7,16 @@
|
||||
#include common_scripts/utility;
|
||||
#include maps/mp/_utility;
|
||||
|
||||
enable_electric_cherry_perk_for_level()
|
||||
enable_electric_cherry_perk_for_level() //checked matches cerberus output
|
||||
{
|
||||
//begin debug code
|
||||
level.custom_zm_perk_electric_cherry_loaded = 1;
|
||||
maps/mp/zombies/_zm_bot::init();
|
||||
if ( !isDefined( level.debugLogging_zm_perk_electric_cherry ) )
|
||||
{
|
||||
level.debugLogging_zm_perk_electric_cherry = 0;
|
||||
}
|
||||
//end debug code
|
||||
register_perk_basic_info( "specialty_grenadepulldeath", "electric_cherry", 2000, &"ZM_PRISON_PERK_CHERRY", "zombie_perk_bottle_cherry" );
|
||||
register_perk_precache_func( "specialty_grenadepulldeath", ::electic_cherry_precache );
|
||||
register_perk_clientfields( "specialty_grenadepulldeath", ::electric_cherry_register_clientfield, ::electric_cherry_set_clientfield );
|
||||
@ -21,14 +29,14 @@ enable_electric_cherry_perk_for_level()
|
||||
}
|
||||
}
|
||||
|
||||
init_electric_cherry()
|
||||
init_electric_cherry() //checked matches cerberus output
|
||||
{
|
||||
level.custom_laststand_func = ::electric_cherry_laststand;
|
||||
set_zombie_var( "tesla_head_gib_chance", 50 );
|
||||
registerclientfield( "allplayers", "electric_cherry_reload_fx", 9000, 2, "int" );
|
||||
}
|
||||
|
||||
electic_cherry_precache()
|
||||
electic_cherry_precache() //checked matches cerberus output
|
||||
{
|
||||
precacheitem( "zombie_perk_bottle_cherry" );
|
||||
precacheshader( "specialty_fastreload_zombies" );
|
||||
@ -44,17 +52,17 @@ electic_cherry_precache()
|
||||
level._effect[ "tesla_shock_secondary" ] = loadfx( "maps/zombie/fx_zombie_tesla_shock_secondary" );
|
||||
}
|
||||
|
||||
electric_cherry_register_clientfield()
|
||||
electric_cherry_register_clientfield() //checked matches cerberus output
|
||||
{
|
||||
registerclientfield( "toplayer", "perk_electric_cherry", 9000, 1, "int" );
|
||||
}
|
||||
|
||||
electric_cherry_set_clientfield( state )
|
||||
electric_cherry_set_clientfield( state ) //checked matches cerberus output
|
||||
{
|
||||
self setclientfieldtoplayer( "perk_electric_cherry", state );
|
||||
}
|
||||
|
||||
electric_cherry_perk_machine_setup( use_trigger, perk_machine, bump_trigger, collision )
|
||||
electric_cherry_perk_machine_setup( use_trigger, perk_machine, bump_trigger, collision ) //checked matches cerberus output
|
||||
{
|
||||
use_trigger.script_sound = "mus_perks_cherry_jingle";
|
||||
use_trigger.script_string = "electric_cherry_perk";
|
||||
@ -68,31 +76,27 @@ electric_cherry_perk_machine_setup( use_trigger, perk_machine, bump_trigger, col
|
||||
}
|
||||
}
|
||||
|
||||
electric_cherry_perk_machine_think()
|
||||
electric_cherry_perk_machine_think() //checked changed to match cerberus output
|
||||
{
|
||||
init_electric_cherry();
|
||||
while ( 1 )
|
||||
{
|
||||
machine = getentarray( "vendingelectric_cherry", "targetname" );
|
||||
machine_triggers = getentarray( "vending_electriccherry", "target" );
|
||||
i = 0;
|
||||
while ( i < machine.size )
|
||||
for ( i = 0; i < machine.size; i++ )
|
||||
{
|
||||
machine[ i ] setmodel( "p6_zm_vending_electric_cherry_off" );
|
||||
i++;
|
||||
}
|
||||
level thread do_initial_power_off_callback( machine, "electriccherry" );
|
||||
array_thread( machine_triggers, ::set_power_on, 0 );
|
||||
level waittill( "electric_cherry_on" );
|
||||
i = 0;
|
||||
while ( i < machine.size )
|
||||
for ( i = 0; i < machine.size; i++ )
|
||||
{
|
||||
machine[ i ] setmodel( "p6_zm_vending_electric_cherry_on" );
|
||||
machine[ i ] vibrate( vectorScale( ( 0, -1, 0 ), 100 ), 0.3, 0.4, 3 );
|
||||
machine[ i ] playsound( "zmb_perks_power_on" );
|
||||
machine[ i ] thread perk_fx( "electriccherry" );
|
||||
machine[ i ] thread play_loop_on_machine();
|
||||
i++;
|
||||
}
|
||||
level notify( "specialty_grenadepulldeath_power_on" );
|
||||
array_thread( machine_triggers, ::set_power_on, 1 );
|
||||
@ -101,24 +105,20 @@ electric_cherry_perk_machine_think()
|
||||
}
|
||||
}
|
||||
|
||||
electric_cherry_host_migration_func()
|
||||
electric_cherry_host_migration_func() //checked changed to match cerberus output
|
||||
{
|
||||
a_electric_cherry_perk_machines = getentarray( "vending_electriccherry", "targetname" );
|
||||
_a130 = a_electric_cherry_perk_machines;
|
||||
_k130 = getFirstArrayKey( _a130 );
|
||||
while ( isDefined( _k130 ) )
|
||||
foreach ( perk_machine in a_electric_cherry_perk_machines )
|
||||
{
|
||||
perk_machine = _a130[ _k130 ];
|
||||
if ( isDefined( perk_machine.model ) && perk_machine.model == "p6_zm_vending_electric_cherry_on" )
|
||||
{
|
||||
perk_machine perk_fx( undefined, 1 );
|
||||
perk_machine thread perk_fx( "electriccherry" );
|
||||
}
|
||||
_k130 = getNextArrayKey( _a130, _k130 );
|
||||
}
|
||||
}
|
||||
|
||||
electric_cherry_laststand()
|
||||
electric_cherry_laststand() //checked changed to match cerberus output
|
||||
{
|
||||
visionsetlaststand( "zombie_last_stand", 1 );
|
||||
if ( isDefined( self ) )
|
||||
@ -129,16 +129,14 @@ electric_cherry_laststand()
|
||||
wait 0.05;
|
||||
a_zombies = get_round_enemy_array();
|
||||
a_zombies = get_array_of_closest( self.origin, a_zombies, undefined, undefined, 500 );
|
||||
i = 0;
|
||||
while ( i < a_zombies.size )
|
||||
for ( i = 0; i < a_zombies.size; i++)
|
||||
{
|
||||
if ( isalive( self ) )
|
||||
{
|
||||
|
||||
if ( a_zombies[ i ].health <= 1000 )
|
||||
{
|
||||
a_zombies[ i ] thread electric_cherry_death_fx();
|
||||
if ( isDefined( self.cherry_kills ) )
|
||||
if ( isdefined( self.cherry_kills ) )
|
||||
{
|
||||
self.cherry_kills++;
|
||||
}
|
||||
@ -149,16 +147,15 @@ electric_cherry_laststand()
|
||||
a_zombies[ i ] thread electric_cherry_stun();
|
||||
a_zombies[ i ] thread electric_cherry_shock_fx();
|
||||
}
|
||||
wait 0.1;
|
||||
wait 0.1 ;
|
||||
a_zombies[ i ] dodamage( 1000, self.origin, self, self, "none" );
|
||||
}
|
||||
i++;
|
||||
}
|
||||
self notify( "electric_cherry_end" );
|
||||
}
|
||||
}
|
||||
|
||||
electric_cherry_death_fx()
|
||||
electric_cherry_death_fx() //checked matches cerberus output
|
||||
{
|
||||
self endon( "death" );
|
||||
tag = "J_SpineUpper";
|
||||
@ -175,7 +172,7 @@ electric_cherry_death_fx()
|
||||
}
|
||||
}
|
||||
|
||||
electric_cherry_shock_fx()
|
||||
electric_cherry_shock_fx() //checked matches cerberus output
|
||||
{
|
||||
self endon( "death" );
|
||||
tag = "J_SpineUpper";
|
||||
@ -188,16 +185,18 @@ electric_cherry_shock_fx()
|
||||
network_safe_play_fx_on_tag( "tesla_shock_fx", 2, level._effect[ fx ], self, tag );
|
||||
}
|
||||
|
||||
electric_cherry_stun()
|
||||
electric_cherry_stun() //checked changed to match cerberus output
|
||||
{
|
||||
self endon( "death" );
|
||||
self notify( "stun_zombie" );
|
||||
self endon( "stun_zombie" );
|
||||
if ( self.health <= 0 )
|
||||
{
|
||||
/*
|
||||
/#
|
||||
iprintln( "trying to stun a dead zombie" );
|
||||
#/
|
||||
*/
|
||||
return;
|
||||
}
|
||||
if ( self.ai_state != "find_flesh" )
|
||||
@ -206,12 +205,10 @@ electric_cherry_stun()
|
||||
}
|
||||
self.forcemovementscriptstate = 1;
|
||||
self.ignoreall = 1;
|
||||
i = 0;
|
||||
while ( i < 2 )
|
||||
for ( i = 0; i < 2; i++ )
|
||||
{
|
||||
self animscripted( self.origin, self.angles, "zm_afterlife_stun" );
|
||||
self maps/mp/animscripts/shared::donotetracks( "stunned" );
|
||||
i++;
|
||||
}
|
||||
self.forcemovementscriptstate = 0;
|
||||
self.ignoreall = 0;
|
||||
@ -219,7 +216,7 @@ electric_cherry_stun()
|
||||
self thread maps/mp/zombies/_zm_ai_basic::find_flesh();
|
||||
}
|
||||
|
||||
electric_cherry_reload_attack()
|
||||
electric_cherry_reload_attack() //checked changed to match cerberus output
|
||||
{
|
||||
self endon( "death" );
|
||||
self endon( "disconnect" );
|
||||
@ -273,8 +270,7 @@ electric_cherry_reload_attack()
|
||||
a_zombies = get_round_enemy_array();
|
||||
a_zombies = get_array_of_closest( self.origin, a_zombies, undefined, undefined, perk_radius );
|
||||
n_zombies_hit = 0;
|
||||
i = 0;
|
||||
while ( i < a_zombies.size )
|
||||
for ( i = 0; i < a_zombies.size; i++ )
|
||||
{
|
||||
if ( isalive( self ) )
|
||||
{
|
||||
@ -298,25 +294,21 @@ electric_cherry_reload_attack()
|
||||
}
|
||||
self maps/mp/zombies/_zm_score::add_to_player_score( 40 );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !isDefined( a_zombies[ i ].is_brutus ) )
|
||||
else if ( !isDefined( a_zombies[ i ].is_brutus ) )
|
||||
{
|
||||
a_zombies[ i ] thread electric_cherry_stun();
|
||||
}
|
||||
a_zombies[ i ] thread electric_cherry_shock_fx();
|
||||
}
|
||||
wait 0.1;
|
||||
a_zombies[ i ] dodamage( perk_dmg, self.origin, self, self, "none" );
|
||||
}
|
||||
i++;
|
||||
}
|
||||
self notify( "electric_cherry_end" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
electric_cherry_cooldown_timer( str_current_weapon )
|
||||
electric_cherry_cooldown_timer( str_current_weapon ) //checked matches cerberus output
|
||||
{
|
||||
self notify( "electric_cherry_cooldown_started" );
|
||||
self endon( "electric_cherry_cooldown_started" );
|
||||
@ -332,7 +324,7 @@ electric_cherry_cooldown_timer( str_current_weapon )
|
||||
self.consecutive_electric_cherry_attacks = 0;
|
||||
}
|
||||
|
||||
check_for_reload_complete( weapon )
|
||||
check_for_reload_complete( weapon ) //checked changed to match cerberus output
|
||||
{
|
||||
self endon( "death" );
|
||||
self endon( "disconnect" );
|
||||
@ -346,15 +338,12 @@ check_for_reload_complete( weapon )
|
||||
{
|
||||
arrayremovevalue( self.wait_on_reload, weapon );
|
||||
self notify( "weapon_reload_complete_" + weapon );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
weapon_replaced_monitor( weapon )
|
||||
weapon_replaced_monitor( weapon ) //checked changed to match cerberus output
|
||||
{
|
||||
self endon( "death" );
|
||||
self endon( "disconnect" );
|
||||
@ -367,15 +356,12 @@ weapon_replaced_monitor( weapon )
|
||||
{
|
||||
self notify( "player_lost_weapon_" + weapon );
|
||||
arrayremovevalue( self.wait_on_reload, weapon );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
electric_cherry_reload_fx( n_fraction )
|
||||
electric_cherry_reload_fx( n_fraction ) //checked matches cerberus output
|
||||
{
|
||||
if ( n_fraction >= 0.67 )
|
||||
{
|
||||
@ -393,8 +379,11 @@ electric_cherry_reload_fx( n_fraction )
|
||||
self setclientfield( "electric_cherry_reload_fx", 0 );
|
||||
}
|
||||
|
||||
electric_cherry_perk_lost()
|
||||
electric_cherry_perk_lost() //checked matches cerberus output
|
||||
{
|
||||
self notify( "stop_electric_cherry_reload_attack" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user