 |
Black Ops 3 Source Code Explorer
0.1
An script explorer for Black Ops 3 by ZeRoY
|
Go to the documentation of this file. 1 #using scripts\shared\ai_shared;
2 #using scripts\shared\clientfield_shared;
3 #using scripts\shared\postfx_shared;
4 #using scripts\shared\util_shared;
7 #insert scripts\shared\shared.gsh;
8 #insert scripts\shared\version.gsh;
9 #insert scripts\shared\ai\margwa.gsh;
10 #insert scripts\shared\archetype_shared\archetype_shared.gsh;
12 #precache( "client_fx", MARGWA_TELEPORT_FX_FILE );
13 #precache( "client_fx", MARGWA_TELEPORT_TRAVEL_FX_FILE );
14 #precache( "client_fx", MARGWA_TELEPORT_TRAVEL_TELL_FX_FILE );
15 #precache( "client_fx", MARGWA_SPAWN_FX_FILE );
16 #precache( "client_fx", MARGWA_IMPACT_FX_FILE );
17 #precache( "client_fx", MARGWA_ROAR_FX_FILE );
18 #precache( "client_fx", MARGWA_SUPER_ROAR_FX_FILE );
21 #using_animtree( "generic" );
81 #namespace MargwaClientUtils;
98 self SetAnim( leftTentacle, 1.0, 0.2, 1.0 );
99 self SetAnim( rightTentacle, 1.0, 0.2, 1.0 );
123 if ( IsDefined(
self.leftGlowFx ) )
125 StopFx( localClientNum,
self.leftGlowFx );
129 if (!isdefined(
self))
139 if( isDefined(
self.margwa_roar_effect ))
141 roar_effect =
self.margwa_roar_effect;
166 if( isDefined(
self.margwa_roar_effect ))
168 roar_effect =
self.margwa_roar_effect;
183 function private margwaHeadMidCallback( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
185 if ( IsDefined(
self.midGlowFx ) )
187 StopFx( localClientNum,
self.midGlowFx );
191 if (!isdefined(
self))
200 if( isDefined(
self.margwa_roar_effect ))
202 roar_effect =
self.margwa_roar_effect;
225 if( isDefined(
self.margwa_roar_effect ))
227 roar_effect =
self.margwa_roar_effect;
244 if ( IsDefined(
self.rightGlowFx ) )
246 StopFx( localClientNum,
self.rightGlowFx );
250 if (!isdefined(
self))
259 if( isDefined(
self.margwa_roar_effect ))
261 roar_effect =
self.margwa_roar_effect;
284 if( isDefined(
self.margwa_roar_effect ))
286 roar_effect =
self.margwa_roar_effect;
303 self endon(
"entityshutdown" );
307 if ( IsDefined(
self.leftGlowFx ) )
309 StopFx( localClientNum,
self.leftGlowFx );
312 if ( IsDefined(
self.midGlowFx ) )
314 StopFx( localClientNum,
self.midGlowFx );
317 if ( IsDefined(
self.rightGlowFx ) )
319 StopFx( localClientNum,
self.rightGlowFx );
323 function private margwaFxInCallback( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
331 function private margwaFxOutCallback( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
345 DeleteFx( localClientNum,
self.travelerFx );
359 DeleteFx( localClientNum,
self.travelerTellFx );
360 self notify(
"stop_margwaTravelTell" );
372 self notify(
"stop_margwaTravelTell" );
373 self endon(
"stop_margwaTravelTell" );
374 self endon(
"entityshutdown" );
376 player = GetLocalPlayer( localClientNum );
380 if( isdefined(player) )
382 dist_sq = DistanceSquared( player.origin,
self.origin );
385 player PlayRumbleOnEntity( localClientNum,
"tank_rumble" );
393 function private margwaFxSpawnCallback( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
398 if( isDefined(
self.margwa_spawn_effect ))
400 spawnfx =
self.margwa_spawn_effect;
403 if ( isDefined(
self.margwa_play_spawn_effect ) )
405 self thread [[
self.margwa_play_spawn_effect ]]( localClientNum );
416 function private margwaHeadExplosion( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
420 self postfx::PlayPostfxBundle(
"pstfx_parasite_dmg" );
426 e_player = GetLocalPlayer( localClientNum );
427 n_dist = DistanceSquared( pos, e_player.origin );
430 n_scale = ( n_margwa_dist - n_dist ) / n_margwa_dist;
434 if( n_scale > 1 || n_scale < 0 )
return;
436 n_scale = n_scale * 0.25;
437 if( n_scale <= 0.01 )
return;
438 e_player Earthquake( n_scale, 0.1, pos, n_dist );
440 if( n_scale <= 0.25 && n_scale > 0.2 )
442 e_player PlayRumbleOnEntity( localClientNum,
"shotgun_fire" );
445 else if( n_scale <= 0.2 && n_scale > 0.1 )
447 e_player PlayRumbleOnEntity( localClientNum,
"damage_heavy" );
451 e_player PlayRumbleOnEntity( localClientNum,
"reload_small" );
455 function private margwaSmashCallback( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
459 e_player = GetLocalPlayer( localClientNum );
462 distSq = DistanceSquared( smashPos, e_player.origin );
465 e_player Earthquake( 0.7, 0.25, e_player.origin, 3000 );
466 e_player PlayRumbleOnEntity( localClientNum,
"shotgun_fire" );
470 e_player Earthquake( 0.7, 0.25, e_player.origin, 1500 );
471 e_player PlayRumbleOnEntity( localClientNum,
"damage_heavy" );
476 function private margwaLeftHitCallback( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
481 if( isdefined(
self.margwa_head_hit_fx ))
483 effect =
self.margwa_head_hit_fx;
489 function private margwaMidHitCallback( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
494 if( isdefined(
self.margwa_head_hit_fx ))
496 effect =
self.margwa_head_hit_fx;
507 if( isdefined(
self.margwa_head_hit_fx ))
509 effect =
self.margwa_head_hit_fx;
519 self.heads[ newValue ].killed =
true;
523 function private margwaJawCallback( localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump )
527 foreach( head
in self.heads )
531 if ( IsDefined( head.prevJawAnim ) )
533 self ClearAnim( head.prevJawAnim, 0.2 );
536 if ( IsDefined( head.prevHeadAnim ) )
541 jawAnim = head.jawBase + level._jaw[ newValue ];
542 head.prevJawAnim = jawAnim;
544 self SetAnim( jawAnim, 1.0, 0.2, 1.0 );
function private margwaRightHitCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_HEAD_CLIENTFIELD_TYPE
function private margwaHeadExplosion(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_JAW_BASE_M
#define MARGWA_SMASH_ATTACK_OFFSET
function private margwaFxOutCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
function private margwaSpawn(localClientNum)
#define MARGWA_TAG_HEAD_RIGHT
function private margwaHeadKilledCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_ANIM_HEAD_RIGHT_OPEN
#define MARGWA_ANIM_HEAD_MID_SMASH
#define MARGWA_TELEPORT_ON
#define MARGWA_IMPACT_FX_FILE
#define MARGWA_ANIM_TENTACLE_LEFT_BASE
#define MARGWA_NUM_TENTACLES_PER_SIDE
#define MARGWA_HEAD_MID_CLIENTFIELD
#define MARGWA_HEAD_SMASH_ATTACK
#define MARGWA_FX_SPAWN_CLIENTFIELD_TYPE
#define MARGWA_JAW_RUN_CHARGE
#define MARGWA_TELEPORT_TRAVEL_FX
#define MARGWA_TELEPORT_TRAVEL_TELL_FX_FILE
#define MARGWA_JAW_TELEPORT_OUT
#define CF_CALLBACK_ZERO_ON_NEW_ENT
#define MARGWA_JAW_REACT_IDGUN
#define MARGWA_FOOTSTEP_EARTHQUAKE_MAX_RADIUS
#define MARGWA_JAW_CLIENTFIELD
#define MARGWA_JAW_HEAD_R_EXPLODE
function private margwaFxTravelCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_ROAR_FX_FILE
#define MARGWA_SMASH_CLIENTFIELD
function get(kvp_value, kvp_key="targetname")
#define MARGWA_MOUTH_BLEND_TIME
function private margwaLeftHitCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_FX_SPAWN_CLIENTFIELD
#define MARGWA_JAW_BASE_L
#define MARGWA_HEAD_RIGHT_HIT_CLIENTFIELD
#define MARGWA_TELEPORT_FX
#define MARGWA_FX_IN_CLIENTFIELD
#define MARGWA_TAG_TELEPORT
#define MARGWA_HEAD_KILLED_LEFT
#define MARGWA_IMPACT_FX
#define MARGWA_JAW_BASE_R
function private margwaMidHitCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_JAW_TRV_JUMP_DOWN_96
function private margwaSmashCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
function private margwaFxInCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_SPAWN_FX_FILE
#define MARGWA_JAW_TRV_JUMP_ACROSS_256
#define MARGWA_HEAD_CLIENTFIELD_BITS
#define MARGWA_JAW_SMASH_ATTACK
#define MARGWA_JAW_TRV_JUMP_DOWN_128
#define MARGWA_FX_SPAWN_CLIENTFIELD_BITS
#define MARGWA_JAW_REACT_STUN
#define MARGWA_JAW_TRV_JUMP_DOWN_36
function private margwaStopSmashFx(localClientNum)
#define MARGWA_ANIM_HEAD_LEFT_OPEN
function private margwaJawCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_ANIM_HEAD_RIGHT_CLOSED
#define MARGWA_SMASH_ATTACK_RANGE_LIGHT
#define MARGWA_JAW_SWIPE
#define MARGWA_JAW_HEAD_L_EXPLODE
#define MARGWA_HEAD_EXPLODE_CLIENTFIELD_TYPE
#define MARGWA_ANIM_HEAD_LEFT_SMASH
#define MARGWA_TELEPORT_FX_FILE
function add_archetype_spawn_function(archetype, spawn_func)
function autoexec main()
function private margwaHeadRightCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_TELEPORT_TRAVEL_FX_FILE
#define MARGWA_SUPER_ROAR_FX_FILE
#define MARGWA_JAW_TRV_JUMP_UP_96
#define MARGWA_JAW_REACT_IDGUN_PACKED
#define MARGWA_HEAD_EXPLODE_CLIENTFIELD_BITS
function private margwaFxSpawnCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_ANIM_HEAD_MID_CLOSED
#define MARGWA_ANIM_HEAD_RIGHT_SMASH
#define MARGWA_HEAD_LEFT_CLIENTFIELD
function waittill_dobj(localClientNum)
#define MARGWA_ANIM_TENTACLE_RIGHT_BASE
#define MARGWA_ANIM_HEAD_LEFT_CLOSED
#define MARGWA_JAW_HEAD_M_EXPLODE
#define MARGWA_HEAD_KILLED_MID
#define MARGWA_FX_OUT_CLIENTFIELD
#define MARGWA_TAG_HEAD_LEFT
#define MARGWA_HEAD_LEFT_HIT_CLIENTFIELD
#define MARGWA_FX_TRAVEL_TELL_CLIENTFIELD
#define MARGWA_HEAD_KILLED_CLIENTFIELD
function margwaProcessFootstep(localClientNum, pos, surface, notetrack, bone)
#define MARGWA_HEAD_RIGHT_CLIENTFIELD
#define MARGWA_SUPER_ROAR_FX
#define MARGWA_TELEPORT_OFF
#define MARGWA_TELL_DIST_SQ
function autoexec precache()
#define MARGWA_JAW_TRV_JUMP_UP_128
function private margwaHeadLeftCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_JAW_TRV_JUMP_UP_36
#define MARGWA_TAG_HEAD_MID
#define MARGWA_ANIM_HEAD_MID_OPEN
#define ARCHETYPE_MARGWA
#define MARGWA_HEAD_MID_HIT_CLIENTFIELD
function private margwaHeadMidCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)
#define MARGWA_HEAD_KILLED_RIGHT
#define MARGWA_TELEPORT_TRAVEL_TELL_FX
#define MARGWA_HEAD_CLOSED
#define MARGWA_FX_TRAVEL_CLIENTFIELD
#define MARGWA_HEAD_OPEN
#define MARGWA_JAW_SWIPE_PLAYER
#define MARGWA_SMASH_ATTACK_RANGE
function private margwaTravelTellUpdate(localClientNum)
#define MARGWA_HEAD_EXPLODE_CLIENTFIELD
#define MARGWA_JAW_TELEPORT_IN
function private margwaFxTravelTellCallback(localClientNum, oldValue, newValue, bNewEnt, bInitialSnap, fieldName, wasDemoJump)