‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_gadget_clone.gsc File Reference

Go to the source code of this file.

Macros

#define CLONE_APPEAR_FX   "player/fx_plyr_clone_reaper_appear"
 
#define CLONE_COUNT   3
 
#define CLONE_FIRST_POINT_DISTANCE   1000
 
#define CLONE_HEALTH_MULTIPLIER   1.5
 
#define CLONE_HEIGHT   72
 
#define CLONE_MAX_CLONES_ALLOWED   20
 
#define CLONE_MAX_SEARCH_RADIUS   750
 
#define CLONE_MAX_SEARCH_RADIUS_INITIAL   450
 
#define CLONE_MIN_SEARCH_RADIUS   500
 
#define CLONE_NOT_MOVING_DIST_SQ   SQR( 24 )
 
#define CLONE_NOT_MOVING_POLL_TIME   2000
 
#define CLONE_ORB_FX   "player/fx_plyr_clone_reaper_orb"
 
#define CLONE_PATH_DISTANCE_THRESHOLD   120
 
#define CLONE_PATH_DISTANCE_THRESHOLD_SQ   CLONE_PATH_DISTANCE_THRESHOLD * CLONE_PATH_DISTANCE_THRESHOLD
 
#define CLONE_SPAWN_DISTANCE   60
 
#define CLONE_SPAWN_FACING_OFFSET   17
 
#define CLONE_SPAWN_FROM_PLAYER_MAX   500
 
#define CLONE_SPAWN_HEIGHT_OFFSET   5
 
#define CLONE_SPAWN_VELOCITY_OFFSET   17
 
#define CLONE_VANISH_FX   "player/fx_plyr_clone_vanish"
 
#define FAKEFIRE_MAX_RANGE   750
 
#define FAKEFIRE_MAX_RANGE_SQR   ( FAKEFIRE_MAX_RANGE * FAKEFIRE_MAX_RANGE )
 
#define FAKEFIRE_MAX_SHOTS   4
 
#define FAKEFIRE_MAX_WAIT_DURATION   3
 
#define FAKEFIRE_MIN_SHOTS   1
 
#define FAKEFIRE_MIN_WAIT_DURATION   .5
 
#define ORB_HEIGHT_OFFSET   ( 40 - CLONE_SPAWN_HEIGHT_OFFSET )
 
#define ORB_TRAVEL_VELOCITY   800
 

Functions

function __init__ ()
 
function private _ChooseWeapon (player)
 
function _CloneBreakGlass ()
 
function _CloneBuildItemList (player)
 
function private _CloneCopyPlayerLook (clone, player)
 
function private _cloneDamaged ()
 
function _CloneFakeFire ()
 
function _CloneOrbFx (endPos, travelTime)
 
function _CloneSelectWeapon (player)
 
function private _CloneWatchDeath ()
 
function _CloneWatchOwnerDisconnect (player)
 
function _CloneWatchShutdown ()
 
function private _ConfigureClone (clone, player, forward, spawnTime)
 
function private _ConfigureCloneTeam (clone, player, isHacked)
 
function private _PlayDematerialization ()
 
function private _show (spawnTime)
 
function private _TestPlayerWeapon (playerweapon, items)
 
function private _UpdateClonePathing ()
 
function CalculateSpawnOrigin (origin, angles, cloneDistance)
 
function cloneDamageOverride (eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, weapon, vPoint, vDir, sHitLoc, vDamageOrigin, timeOffset, boneIndex, modelIndex, surfaceType, surfaceNormal)
 
function gadget_clone_is_flickering (slot)
 
function gadget_clone_is_inuse (slot)
 
function gadget_clone_off (slot, weapon)
 
function gadget_clone_on (slot, weapon)
 
function gadget_clone_on_connect ()
 
function gadget_clone_on_flicker (slot, weapon)
 
function gadget_clone_on_give (slot, weapon)
 
function gadget_clone_on_take (slot, weapon)
 
function insertClone (clone)
 
function is_jumping ()
 
function killClones (player)
 
function ProcessCloneScoreEvent (clone, attacker, weapon)
 
function removeClone (clone)
 
function removeOldestClone ()
 
function spawnClones ()
 

Macro Definition Documentation

◆ CLONE_APPEAR_FX

#define CLONE_APPEAR_FX   "player/fx_plyr_clone_reaper_appear"

Definition at line 54 of file _gadget_clone.gsc.

◆ CLONE_COUNT

#define CLONE_COUNT   3

Definition at line 29 of file _gadget_clone.gsc.

◆ CLONE_FIRST_POINT_DISTANCE

#define CLONE_FIRST_POINT_DISTANCE   1000

Definition at line 38 of file _gadget_clone.gsc.

◆ CLONE_HEALTH_MULTIPLIER

#define CLONE_HEALTH_MULTIPLIER   1.5

Definition at line 32 of file _gadget_clone.gsc.

◆ CLONE_HEIGHT

#define CLONE_HEIGHT   72

Definition at line 30 of file _gadget_clone.gsc.

◆ CLONE_MAX_CLONES_ALLOWED

#define CLONE_MAX_CLONES_ALLOWED   20

Definition at line 31 of file _gadget_clone.gsc.

◆ CLONE_MAX_SEARCH_RADIUS

#define CLONE_MAX_SEARCH_RADIUS   750

Definition at line 41 of file _gadget_clone.gsc.

◆ CLONE_MAX_SEARCH_RADIUS_INITIAL

#define CLONE_MAX_SEARCH_RADIUS_INITIAL   450

Definition at line 39 of file _gadget_clone.gsc.

◆ CLONE_MIN_SEARCH_RADIUS

#define CLONE_MIN_SEARCH_RADIUS   500

Definition at line 40 of file _gadget_clone.gsc.

◆ CLONE_NOT_MOVING_DIST_SQ

#define CLONE_NOT_MOVING_DIST_SQ   SQR( 24 )

Definition at line 346 of file _gadget_clone.gsc.

◆ CLONE_NOT_MOVING_POLL_TIME

#define CLONE_NOT_MOVING_POLL_TIME   2000

Definition at line 347 of file _gadget_clone.gsc.

◆ CLONE_ORB_FX

#define CLONE_ORB_FX   "player/fx_plyr_clone_reaper_orb"

Definition at line 52 of file _gadget_clone.gsc.

◆ CLONE_PATH_DISTANCE_THRESHOLD

#define CLONE_PATH_DISTANCE_THRESHOLD   120

Definition at line 42 of file _gadget_clone.gsc.

◆ CLONE_PATH_DISTANCE_THRESHOLD_SQ

#define CLONE_PATH_DISTANCE_THRESHOLD_SQ   CLONE_PATH_DISTANCE_THRESHOLD * CLONE_PATH_DISTANCE_THRESHOLD

Definition at line 43 of file _gadget_clone.gsc.

◆ CLONE_SPAWN_DISTANCE

#define CLONE_SPAWN_DISTANCE   60

Definition at line 33 of file _gadget_clone.gsc.

◆ CLONE_SPAWN_FACING_OFFSET

#define CLONE_SPAWN_FACING_OFFSET   17

Definition at line 36 of file _gadget_clone.gsc.

◆ CLONE_SPAWN_FROM_PLAYER_MAX

#define CLONE_SPAWN_FROM_PLAYER_MAX   500

Definition at line 37 of file _gadget_clone.gsc.

◆ CLONE_SPAWN_HEIGHT_OFFSET

#define CLONE_SPAWN_HEIGHT_OFFSET   5

Definition at line 34 of file _gadget_clone.gsc.

◆ CLONE_SPAWN_VELOCITY_OFFSET

#define CLONE_SPAWN_VELOCITY_OFFSET   17

Definition at line 35 of file _gadget_clone.gsc.

◆ CLONE_VANISH_FX

#define CLONE_VANISH_FX   "player/fx_plyr_clone_vanish"

Definition at line 53 of file _gadget_clone.gsc.

◆ FAKEFIRE_MAX_RANGE

#define FAKEFIRE_MAX_RANGE   750

Definition at line 44 of file _gadget_clone.gsc.

◆ FAKEFIRE_MAX_RANGE_SQR

#define FAKEFIRE_MAX_RANGE_SQR   ( FAKEFIRE_MAX_RANGE * FAKEFIRE_MAX_RANGE )

Definition at line 45 of file _gadget_clone.gsc.

◆ FAKEFIRE_MAX_SHOTS

#define FAKEFIRE_MAX_SHOTS   4

Definition at line 47 of file _gadget_clone.gsc.

◆ FAKEFIRE_MAX_WAIT_DURATION

#define FAKEFIRE_MAX_WAIT_DURATION   3

Definition at line 49 of file _gadget_clone.gsc.

◆ FAKEFIRE_MIN_SHOTS

#define FAKEFIRE_MIN_SHOTS   1

Definition at line 46 of file _gadget_clone.gsc.

◆ FAKEFIRE_MIN_WAIT_DURATION

#define FAKEFIRE_MIN_WAIT_DURATION   .5

Definition at line 48 of file _gadget_clone.gsc.

◆ ORB_HEIGHT_OFFSET

#define ORB_HEIGHT_OFFSET   ( 40 - CLONE_SPAWN_HEIGHT_OFFSET )

Definition at line 51 of file _gadget_clone.gsc.

◆ ORB_TRAVEL_VELOCITY

#define ORB_TRAVEL_VELOCITY   800

Definition at line 50 of file _gadget_clone.gsc.

Function Documentation

◆ __init__()

◆ _ChooseWeapon()

function private _ChooseWeapon ( player  )

Definition at line 830 of file _gadget_clone.gsc.

Referenced by _CloneSelectWeapon().

◆ _CloneBreakGlass()

function _CloneBreakGlass ( )

Definition at line 706 of file _gadget_clone.gsc.

References break_glass().

Referenced by _ConfigureClone().

◆ _CloneBuildItemList()

function _CloneBuildItemList ( player  )

◆ _CloneCopyPlayerLook()

function private _CloneCopyPlayerLook ( clone  ,
player   
)

Definition at line 453 of file _gadget_clone.gsc.

Referenced by _ConfigureClone().

◆ _cloneDamaged()

function private _cloneDamaged ( )

Definition at line 622 of file _gadget_clone.gsc.

References set(), and wait_network_frame().

Referenced by cloneDamageOverride().

◆ _CloneFakeFire()

function _CloneFakeFire ( )

◆ _CloneOrbFx()

function _CloneOrbFx ( endPos  ,
travelTime   
)

Definition at line 437 of file _gadget_clone.gsc.

References CLONE_ORB_FX, ORB_HEIGHT_OFFSET, spawn(), and waittill_any_timeout().

Referenced by spawnClones().

◆ _CloneSelectWeapon()

function _CloneSelectWeapon ( player  )

◆ _CloneWatchDeath()

function private _CloneWatchDeath ( )

Definition at line 572 of file _gadget_clone.gsc.

References _PlayDematerialization(), and removeClone().

Referenced by _ConfigureClone().

◆ _CloneWatchOwnerDisconnect()

function _CloneWatchOwnerDisconnect ( player  )

Definition at line 670 of file _gadget_clone.gsc.

References waittill_any().

Referenced by _ConfigureClone().

◆ _CloneWatchShutdown()

function _CloneWatchShutdown ( )

Definition at line 684 of file _gadget_clone.gsc.

References _PlayDematerialization(), and removeClone().

Referenced by _ConfigureClone().

◆ _ConfigureClone()

◆ _ConfigureCloneTeam()

function private _ConfigureCloneTeam ( clone  ,
player  ,
isHacked   
)

Definition at line 585 of file _gadget_clone.gsc.

References isHacked().

Referenced by _ConfigureClone().

◆ _PlayDematerialization()

function private _PlayDematerialization ( )

Definition at line 562 of file _gadget_clone.gsc.

References CLONE_VANISH_FX, and PlayFx().

Referenced by _CloneWatchDeath(), _CloneWatchShutdown(), and gadget_clone_off().

◆ _show()

function private _show ( spawnTime  )

Definition at line 598 of file _gadget_clone.gsc.

References CLONE_APPEAR_FX, PlayFx(), and set().

Referenced by _ConfigureClone().

◆ _TestPlayerWeapon()

function private _TestPlayerWeapon ( playerweapon  ,
items   
)

Definition at line 844 of file _gadget_clone.gsc.

Referenced by _CloneSelectWeapon().

◆ _UpdateClonePathing()

◆ CalculateSpawnOrigin()

function CalculateSpawnOrigin ( origin  ,
angles  ,
cloneDistance   
)

◆ cloneDamageOverride()

function cloneDamageOverride ( eInflictor  ,
eAttacker  ,
iDamage  ,
iDFlags  ,
sMeansOfDeath  ,
weapon  ,
vPoint  ,
vDir  ,
sHitLoc  ,
vDamageOrigin  ,
timeOffset  ,
boneIndex  ,
modelIndex  ,
surfaceType  ,
surfaceNormal   
)

Definition at line 644 of file _gadget_clone.gsc.

References _cloneDamaged(), and ProcessCloneScoreEvent().

Referenced by _ConfigureClone().

◆ gadget_clone_is_flickering()

function gadget_clone_is_flickering ( slot  )

Definition at line 83 of file _gadget_clone.gsc.

Referenced by __init__().

◆ gadget_clone_is_inuse()

function gadget_clone_is_inuse ( slot  )

Definition at line 78 of file _gadget_clone.gsc.

Referenced by __init__().

◆ gadget_clone_off()

function gadget_clone_off ( slot  ,
weapon   
)

Definition at line 609 of file _gadget_clone.gsc.

References _PlayDematerialization(), clear(), killClones(), and set().

Referenced by __init__(), and spawnClones().

◆ gadget_clone_on()

function gadget_clone_on ( slot  ,
weapon   
)

Definition at line 337 of file _gadget_clone.gsc.

References CLONE_APPEAR_FX, PlayFx(), set(), and spawnClones().

Referenced by __init__().

◆ gadget_clone_on_connect()

function gadget_clone_on_connect ( )

Definition at line 105 of file _gadget_clone.gsc.

Referenced by __init__().

◆ gadget_clone_on_flicker()

function gadget_clone_on_flicker ( slot  ,
weapon   
)

Definition at line 89 of file _gadget_clone.gsc.

Referenced by __init__().

◆ gadget_clone_on_give()

function gadget_clone_on_give ( slot  ,
weapon   
)

Definition at line 94 of file _gadget_clone.gsc.

Referenced by __init__().

◆ gadget_clone_on_take()

function gadget_clone_on_take ( slot  ,
weapon   
)

Definition at line 99 of file _gadget_clone.gsc.

Referenced by __init__().

◆ insertClone()

function insertClone ( clone  )

Definition at line 207 of file _gadget_clone.gsc.

References CLONE_MAX_CLONES_ALLOWED.

Referenced by spawnClones().

◆ is_jumping()

function is_jumping ( )

Definition at line 124 of file _gadget_clone.gsc.

Referenced by CalculateSpawnOrigin().

◆ killClones()

function killClones ( player  )

Definition at line 110 of file _gadget_clone.gsc.

Referenced by gadget_clone_off(), and spawnClones().

◆ ProcessCloneScoreEvent()

function ProcessCloneScoreEvent ( clone  ,
attacker  ,
weapon   
)

Definition at line 630 of file _gadget_clone.gsc.

References processScoreEvent().

Referenced by Callback_ActorKilled(), and cloneDamageOverride().

◆ removeClone()

function removeClone ( clone  )

Definition at line 226 of file _gadget_clone.gsc.

References CLONE_MAX_CLONES_ALLOWED, and remove_undefined().

Referenced by _CloneWatchDeath(), and _CloneWatchShutdown().

◆ removeOldestClone()

function removeOldestClone ( )

Definition at line 243 of file _gadget_clone.gsc.

References CLONE_MAX_CLONES_ALLOWED, and remove_undefined().

Referenced by spawnClones().

◆ spawnClones()