1 #using scripts\codescripts\struct;
3 #using scripts\shared\aat_shared;
4 #using scripts\shared\array_shared;
5 #using scripts\shared\clientfield_shared;
6 #using scripts\shared\flag_shared;
7 #using scripts\shared\math_shared;
8 #using scripts\shared\spawner_shared;
9 #using scripts\shared\system_shared;
10 #using scripts\shared\table_shared;
11 #using scripts\shared\util_shared;
12 #using scripts\shared\ai\systems\gib;
13 #using scripts\shared\ai\zombie_utility;
15 #insert scripts\shared\aat_zm.gsh;
16 #insert scripts\shared\shared.gsh;
17 #insert scripts\shared\version.gsh;
19 #using scripts\zm\_zm_stats;
20 #using scripts\zm\_zm_utility;
22 #insert scripts\zm\aats\_zm_aat_turned.gsh;
24 #insert scripts\zm\_zm_utility.gsh;
26 #precache( "material", ZM_AAT_TURNED_DAMAGE_FEEDBACK_ICON );
28 #namespace zm_aat_turned;
52 self.aat_turned =
true;
53 self.n_aat_turned_zombie_kills = 0;
54 self.allowDeath =
false;
55 self.allowpain =
false;
62 if (
self.zombie_arms_position ==
"up" )
73 if (
self.zombie_arms_position ==
"up" )
83 if ( IsDefined( attacker ) && IsPlayer( attacker ) )
95 v_turned_blast_pos =
self.origin;
97 a_ai_zombies = array::get_all_closest( v_turned_blast_pos, GetAITeamArray(
"axis" ), undefined, undefined,
ZM_AAT_TURNED_RANGE );
98 if ( !isDefined( a_ai_zombies ) )
106 for ( i = 0; i < a_ai_zombies.size; i++ )
109 if ( !IsDefined( a_ai_zombies[i] ) || !IsAlive( a_ai_zombies[i] ) )
121 if ( a_ai_zombies[i] ==
self )
127 v_curr_zombie_origin = a_ai_zombies[i] GetCentroid();
128 if ( DistanceSquared( v_turned_blast_pos, v_curr_zombie_origin ) > f_turned_range_sq )
134 a_ai_zombies[i] DoDamage( a_ai_zombies[i].health, v_curr_zombie_origin, attacker, attacker,
"none",
"MOD_IMPACT" );
137 n_random_x = RandomFloatRange( -3, 3 );
138 n_random_y = RandomFloatRange( -3, 3 );
140 a_ai_zombies[i] StartRagdoll(
true );
162 if(
IS_TRUE(
self.barricade_enter ) )
167 if (
IS_TRUE(
self.is_traversing ) )
172 if ( !
IS_TRUE(
self.completed_emerging_into_playable_area ) )
182 if ( IsDefined( level.zm_aat_turned_validation_override ) && !
self [[level.zm_aat_turned_validation_override]]() )
194 self endon(
"death" );
195 self endon(
"entityshutdown" );
200 self.allowDeath =
true;
207 self endon(
"death" );
208 self endon(
"entityshutdown" );
217 self.allowDeath =
true;
225 gibserverutils::gibhead(
self );
229 gibserverutils::gibleftarm(
self );
233 gibserverutils::gibrightarm(
self );
236 gibserverutils::giblegs(
self );
238 self DoDamage(
self.health,
self.origin );