‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
All Data Structures Files Functions Variables Macros
zombie.csc
Go to the documentation of this file.
1 #using scripts\shared\clientfield_shared;
2 #using scripts\shared\ai\systems\gib;
3 #using scripts\shared\ai_shared;
4 
5 #insert scripts\shared\archetype_shared\archetype_shared.gsh;
6 #insert scripts\shared\version.gsh;
7 #insert scripts\shared\ai\zombie.gsh;
8 #insert scripts\shared\ai\systems\gib.gsh;
9 
10 #precache( "client_fx", "zombie/fx_val_chest_burst");
11 
12 #precache( "client_fx", "fire/fx_fire_ai_human_arm_left_loop_optim");
13 #precache( "client_fx", "fire/fx_fire_ai_human_arm_right_loop_optim");
14 #precache( "client_fx", "fire/fx_fire_ai_human_arm_left_loop_optim");
15 #precache( "client_fx", "fire/fx_fire_ai_human_arm_right_loop_optim");
16 #precache( "client_fx", "fire/fx_fire_ai_human_torso_loop_optim");
17 #precache( "client_fx", "fire/fx_fire_ai_human_hip_left_loop_optim");
18 #precache( "client_fx", "fire/fx_fire_ai_human_hip_right_loop_optim");
19 #precache( "client_fx", "fire/fx_fire_ai_human_leg_left_loop_optim");
20 #precache( "client_fx", "fire/fx_fire_ai_human_leg_right_loop_optim");
21 #precache( "client_fx", "fire/fx_fire_ai_human_head_loop_optim");
22 
23 function autoexec ‪precache()
24 {
25 
26 }
27 
28 function autoexec ‪main()
29 {
30  level._effect["zombie_special_day_effect"] = "zombie/fx_val_chest_burst";
31 
33 
35  "actor",
38  1,
39  "int",
43 
45  "actor",
48  1,
49  "counter",
53 }
54 
55 #namespace ZombieClientUtils;
56 
57 function ‪zombieHandler( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
58 {
59  entity = self;
60 
61  if ( IsDefined( entity.archetype ) && entity.archetype != ‪ARCHETYPE_ZOMBIE )
62  {
63  return;
64  }
65 
66  if ( !IsDefined( entity.initializedGibCallbacks ) || !entity.initializedGibCallbacks )
67  {
68  entity.initializedGibCallbacks = true;
69 
75  }
76 }
77 
78 function private ‪_gibCallback( localClientNum, entity, gibFlag )
79 {
80  switch (gibFlag)
81  {
83  playsound(0, "zmb_zombie_head_gib", self.origin + (0,0,60));
84  break;
89  playsound(0, "zmb_death_gibs", self.origin + (0,0,30));
90  break;
91  }
92 }
93 
94 function ‪zombieSpecialDayEffectsHandler( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
95 {
96  entity = self;
97 
98  if ( IsDefined( entity.archetype ) && entity.archetype != ‪ARCHETYPE_ZOMBIE )
99  {
100  return;
101  }
102 
103  origin = entity GetTagOrigin( "j_spine4" );
104 
105  fx = PlayFX( localClientNum, level._effect["zombie_special_day_effect"], origin );
106  SetFXIgnorePause( localClientNum, fx, true );
107 }
108 
109 function ‪zombie_override_burn_fx( localClientNum )
110 {
111  if( SessionModeIsZombiesGame() )
112  {
113  if( !isdefined( self._effect ))
114  {
115  self._effect = [];
116  }
117  level._effect["fire_zombie_j_elbow_le_loop"] = "fire/fx_fire_ai_human_arm_left_loop_optim"; // hand and forearm fires
118  level._effect["fire_zombie_j_elbow_ri_loop"] = "fire/fx_fire_ai_human_arm_right_loop_optim";
119  level._effect["fire_zombie_j_shoulder_le_loop"] = "fire/fx_fire_ai_human_arm_left_loop_optim"; // upper arm fires
120  level._effect["fire_zombie_j_shoulder_ri_loop"] = "fire/fx_fire_ai_human_arm_right_loop_optim";
121  level._effect["fire_zombie_j_spine4_loop"] = "fire/fx_fire_ai_human_torso_loop_optim"; // upper torso fires
122  level._effect["fire_zombie_j_hip_le_loop"] = "fire/fx_fire_ai_human_hip_left_loop_optim"; // thigh fires
123  level._effect["fire_zombie_j_hip_ri_loop"] = "fire/fx_fire_ai_human_hip_right_loop_optim";
124  level._effect["fire_zombie_j_knee_le_loop"] = "fire/fx_fire_ai_human_leg_left_loop_optim"; // shin fires
125  level._effect["fire_zombie_j_knee_ri_loop"] = "fire/fx_fire_ai_human_leg_right_loop_optim";
126  level._effect["fire_zombie_j_head_loop"] = "fire/fx_fire_ai_human_head_loop_optim"; // head fire
127  }
128 }
‪zombieSpecialDayEffectsHandler
‪function zombieSpecialDayEffectsHandler(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
Definition: zombie.csc:94
‪GIB_LEGS_RIGHT_LEG_FLAG
‪#define GIB_LEGS_RIGHT_LEG_FLAG
Definition: gib.gsh:28
‪zombie_override_burn_fx
‪function zombie_override_burn_fx(localClientNum)
Definition: zombie.csc:109
‪_gibCallback
‪function private _gibCallback(localClientNum, entity, gibFlag)
Definition: zombie.csc:78
‪AddGibCallback
‪function AddGibCallback(localClientNum, entity, gibFlag, callbackFunction)
Definition: gib.csc:608
‪GIB_TORSO_RIGHT_ARM_FLAG
‪#define GIB_TORSO_RIGHT_ARM_FLAG
Definition: gib.gsh:25
‪CF_CALLBACK_ZERO_ON_NEW_ENT
‪#define CF_CALLBACK_ZERO_ON_NEW_ENT
Definition: version.gsh:103
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪ZOMBIE_CLIENTFIELD
‪#define ZOMBIE_CLIENTFIELD
Definition: zombie.gsh:61
‪main
‪function autoexec main()
Definition: zombie.csc:28
‪GIB_LEGS_LEFT_LEG_FLAG
‪#define GIB_LEGS_LEFT_LEG_FLAG
Definition: gib.gsh:29
‪CF_HOST_ONLY
‪#define CF_HOST_ONLY
Definition: version.gsh:102
‪ARCHETYPE_ZOMBIE
‪#define ARCHETYPE_ZOMBIE
Definition: archetype_shared.gsh:10
‪add_archetype_spawn_function
‪function add_archetype_spawn_function(archetype, spawn_func)
Definition: ai_shared.csc:23
‪ZOMBIE_SPECIAL_DAY_EFFECTS_CLIENTFIELD
‪#define ZOMBIE_SPECIAL_DAY_EFFECTS_CLIENTFIELD
Definition: zombie.gsh:62
‪GIB_TORSO_LEFT_ARM_FLAG
‪#define GIB_TORSO_LEFT_ARM_FLAG
Definition: gib.gsh:26
‪VERSION_TU6_FFOTD_020416_0
‪#define VERSION_TU6_FFOTD_020416_0
Definition: version.gsh:50
‪precache
‪function autoexec precache()
Definition: zombie.csc:23
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪zombieHandler
‪function zombieHandler(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
Definition: zombie.csc:57
‪GIB_TORSO_HEAD_FLAG
‪#define GIB_TORSO_HEAD_FLAG
Definition: gib.gsh:24