 |
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\codescripts\struct;
3 #using scripts\shared\callbacks_shared;
4 #using scripts\shared\clientfield_shared;
5 #using scripts\shared\flag_shared;
6 #using scripts\shared\flagsys_shared;
7 #using scripts\shared\system_shared;
8 #using scripts\shared\util_shared;
9 #using scripts\shared\visionset_mgr_shared;
11 #using scripts\shared\abilities\_ability_player;
12 #using scripts\shared\abilities\_ability_power;
13 #using scripts\shared\abilities\_ability_util;
15 #insert scripts\shared\shared.gsh;
16 #insert scripts\shared\version.gsh;
17 #insert scripts\shared\abilities\_ability_util.gsh;
18 #insert scripts\shared\abilities\gadgets\_gadget_flashback.gsh;
22 #define FLASHBACK_TRAIL_IMPACT_FX "player/fx_plyr_flashback_trail_impact"
24 #precache( "fx", FLASHBACK_TRAIL_IMPACT_FX );
44 if ( !IsDefined( level.vsmgr_prio_overlay_flashback_warp ) )
46 level.vsmgr_prio_overlay_flashback_warp = 27;
65 return self GadgetFlickering( slot );
91 self endon (
"death" );
93 wait( FLASHBACK_CLONE_DURATION );
103 #define MAX_RECURSION_DEPTH 8
109 foreach( grenade
in linkedGrenades )
111 grenade
launch( (RandomFloatRange( -5, 5 ),RandomFloatRange( -5, 5 ),5) );
119 grenades = getentarray(
"grenade",
"classname" );
120 radiusSq = radius * radius;
123 foreach( grenade
in grenades )
125 if( DistanceSquared( origin, grenade.origin ) < radiusSq )
127 if ( IsDefined( grenade.stuckToPlayer ) && ( grenade.stuckToPlayer ==
self ) )
131 linkedGrenades[linkedGrenades.size] = grenade;
144 self GadgetSetActivateTime( slot, GetTime() );
148 self.flashbackTime = GetTime();
150 self notify(
"flashback");
152 clone =
self CreateFlashbackClone();
157 oldpos =
self GetTagOrigin(
"j_spineupper" );
158 offset = oldpos -
self.origin;
160 newpos =
self flashbackstart( weapon ) + offset;
163 if ( isdefined ( newpos ) && isdefined ( oldpos ) )
169 if ( isdefined( level.playGadgetSuccess ) )
171 self [[ level.playGadgetSuccess ]]( weapon,
"flashbackSuccessDelay" );
180 self endon (
"death" );
181 self endon (
"disconnect" );
194 if ( recursionDepth <= 0 )
198 trace = BulletTrace( startPos, endPos,
false,
self );
199 if (
trace[
"fraction" ] < 1.0 &&
trace[
"normal" ] != ( 0,0,0 ) )
203 newStartPos =
trace[
"position" ] -
trace[
"normal" ];
210 self endon(
"disconnect" );
219 dirVec = newPos - oldPos;
220 if ( dirVec == (0,0,0) )
224 dirVec = VectorNormalize( dirVec );
225 angles = VectorToAngles( dirVec );
226 fxOrg =
spawn(
"script_model", oldpos, 0, angles );
227 fxOrg.angles = angles;
228 fxOrg setowner(
self );
229 fxOrg SetModel(
"tag_origin" );
233 tagPos =
self GetTagOrigin(
"j_spineupper" );
234 fxOrg MoveTo( tagPos, 0.1 );
235 fxOrg waittill(
"movedone" );
252 self flashbackfinish();
254 if( level.gameEnded )
256 self FreezeControls(
true );
function register_gadget_is_flickering_callbacks(type, flickering_func)
function gadget_flashback_on_connect()
function register_gadget_possession_callbacks(type, on_give, on_take)
#define FLASHBACK_WARP_LENGTH
function clear(str_flag)
function ramp_in_out_thread_per_player_death_shutdown(player, ramp_in, full_period, ramp_out)
function gadget_flashback_is_primed(slot, weapon)
function register_gadget_is_inuse_callbacks(type, inuse_func)
#define GADGET_TYPE_FLASHBACK
function launch(ent_1, str_tag1, ent_2, str_tag2, str_beam_type)
function clone_watch_death()
#define FLASHBACK_TRAIL_IMPACT_FX
function trace(from, to, target)
function spawn(v_origin=(0, 0, 0), v_angles=(0, 0, 0))
function waittill_any_timeout(n_timeout, string1, string2, string3, string4, string5)
function get(kvp_value, kvp_key="targetname")
function gadget_flashback_on_take(slot, weapon)
function register_gadget_flicker_callbacks(type, on_flicker)
function flashBackTrailImpact(startPos, endPos, recursionDepth)
function gadget_flashback_on(slot, weapon)
function watchClientfields()
function gadget_flashback_is_flickering(slot)
#define MAX_RECURSION_DEPTH
function on_spawned(func, obj)
function wait_network_frame(n_count=1)
function register_gadget_activation_callbacks(type, turn_on, turn_off)
function gadget_flashback_on_flicker(slot, weapon)
#define REGISTER_SYSTEM(__sys, __func_init_preload, __reqs)
function unlink_grenades(oldpos)
function deactivateFlashbackWarpAfterTime(time)
function register_info(type, name, version, lerp_step_count)
function drop_unlinked_grenades(linkedGrenades)
function set(str_field_name, n_value)
function register_gadget_primed_callbacks(type, primed_func)
function gadget_flashback_is_inuse(slot)
function gadget_flashback_off(slot, weapon)
function gadget_flashback_on_give(slot, weapon)
function flashbackTrailFx(slot, weapon, oldpos, newPos)
function gadget_flashback_spawned()