‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_sentinel.gsc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\array_shared;
4 #using scripts\shared\audio_shared;
5 #using scripts\shared\callbacks_shared;
6 #using scripts\shared\challenges_shared;
7 #using scripts\shared\clientfield_shared;
8 #using scripts\shared\math_shared;
9 #using scripts\shared\killstreaks_shared;
10 #using scripts\shared\statemachine_shared;
11 #using scripts\shared\system_shared;
12 #using scripts\shared\turret_shared;
13 #using scripts\shared\util_shared;
14 #using scripts\shared\vehicle_ai_shared;
15 #using scripts\shared\vehicle_death_shared;
16 #using scripts\shared\vehicle_shared;
17 #using scripts\shared\vehicles\_wasp;
18 #using scripts\shared\visionset_mgr_shared;
19 #using scripts\shared\scoreevents_shared;
20 #using scripts\shared\weapons\_heatseekingmissile;
21 
22 #using scripts\mp\_util;
23 #using scripts\mp\gametypes\_shellshock;
24 #using scripts\mp\gametypes\_spawning;
25 #using scripts\mp\killstreaks\_airsupport;
26 #using scripts\mp\killstreaks\_helicopter;
27 #using scripts\mp\killstreaks\_killstreak_bundles;
28 #using scripts\mp\killstreaks\_killstreak_detect;
29 #using scripts\mp\killstreaks\_killstreak_hacking;
30 #using scripts\mp\killstreaks\_killstreaks;
31 #using scripts\mp\killstreaks\_killstreakrules;
32 #using scripts\mp\killstreaks\_qrdrone;
33 #using scripts\mp\killstreaks\_rcbomb;
34 #using scripts\mp\killstreaks\_remote_weapons;
35 #using scripts\mp\teams\_teams;
36 
37 #insert scripts\mp\_hacker_tool.gsh;
38 #insert scripts\mp\killstreaks\_killstreaks.gsh;
39 #insert scripts\shared\clientfields.gsh;
40 #insert scripts\shared\archetype_shared\archetype_shared.gsh;
41 #insert scripts\shared\shared.gsh;
42 #insert scripts\shared\statemachine.gsh;
43 #insert scripts\shared\version.gsh;
44 
45 #precache( "string", "mpl_killstreak_sentinel_strt" );
46 #precache( "string", "KILLSTREAK_SENTINEL_HACKED" );
47 #precache( "string", "KILLSTREAK_SENTINEL_INBOUND" );
48 #precache( "string", "KILLSTREAK_SENTINEL_NOT_AVAILABLE" );
49 #precache( "string", "KILLSTREAK_SENTINEL_EARNED" );
50 #precache( "string", "KILLSTREAK_SENTINEL_NOT_PLACEABLE" );
51 #precache( "string", "KILLSTREAK_DESTROYED_SENTINEL" );
52 
53 #precache( "triggerstring", "KILLSTREAK_SENTINEL_USE_REMOTE" );
54 
55 #namespace sentinel;
56 #define SENTINEL_NAME "sentinel"
57 #define INVENTORY_SENTINEL_NAME "inventory_sentinel"
58 #define SENTINEL_SHUTOWN_NOTIFY "sentinel_shutdown"
59 
60 function ‪init()
61 {
63  ‪killstreaks::register_strings( ‪SENTINEL_NAME, &"KILLSTREAK_SENTINEL_EARNED", &"KILLSTREAK_SENTINEL_NOT_AVAILABLE", &"KILLSTREAK_SENTINEL_INBOUND", undefined, &"KILLSTREAK_SENTINEL_HACKED" );
64  ‪killstreaks::register_dialog( ‪SENTINEL_NAME, "mpl_killstreak_sentinel_strt", "sentinelDialogBundle", "sentinelPilotDialogBundle", "friendlySentinel", "enemySentinel", "enemySentinelMultiple", "friendlySentinelHacked", "enemySentinelHacked", "requestSentinel", "threatSentinel" );
68 
69  // TODO: Move to killstreak data
70  level.killstreaks[‪SENTINEL_NAME].threatOnKill = true;
71 
72  vehicle::add_main_callback( ‪SENTINEL_VEHICLE_NAME, &‪InitSentinel );
73 
75 }
76 
77 function ‪InitSentinel()
78 {
79  self.settings = ‪struct::get_script_bundle( "vehiclecustomsettings", self.scriptbundlesettings );
80  Target_Set( self, ( 0, 0, 0 ) );
81  self.health = self.healthdefault;
82  self.numFlares = 1;
83  self.damageTaken = 0;
85  self EnableAimAssist();
86  self SetNearGoalNotifyDist( ‪SENTINEL_NEAR_GOAL_NOTIFY_DIST );
88  self.fovcosine = 0; // +/-90 degrees = 180
89  self.fovcosinebusy = 0; //+/- 55 degrees = 110 fov
90  self.vehAirCraftCollisionEnabled = true;
91 
92  self thread ‪vehicle_ai::nudge_collision();
93  self thread ‪heatseekingmissile::MissileTarget_ProximityDetonateIncomingMissile( "explode", "death" ); // fires chaff if needed
94  self thread ‪helicopter::create_flare_ent( (0,0,-20) );
95  self thread ‪audio::vehicleSpawnContext();
96  self.do_scripted_crash = false;
97 
98  self.overrideVehicleDamage = &‪SentinelDamageOverride;
99  self.selfDestruct = false;
100 
101  self.enable_target_laser = true;
102  self.aggresive_navvolume_recover = true;
103 
108  self ‪vehicle_ai::get_state_callbacks( "driving" ).enter_func = &‪driving_enter;
109 
111  self ‪vehicle_ai::add_state( "guard",
115 
117  ‪vehicle_ai::add_utility_connection( "guard", "combat" );
118  ‪vehicle_ai::add_interrupt_connection( "guard", "emped", "emped" );
119  ‪vehicle_ai::add_interrupt_connection( "guard", "surge", "surge" );
120  ‪vehicle_ai::add_interrupt_connection( "guard", "off", "shut_off" );
121  ‪vehicle_ai::add_interrupt_connection( "guard", "pain", "pain" );
122  ‪vehicle_ai::add_interrupt_connection( "guard", "driving", "enter_vehicle" );
123 
124  self ‪vehicle_ai::StartInitialState( "combat" );
125 }
126 
127 function ‪driving_enter( params )
128 {
130 }
131 
132 function ‪drone_pain_for_time( time, stablizeParam, restoreLookPoint, weapon )
133 {
134  self endon( "death" );
135 
136  self.painStartTime = GetTime();
137 
138  if ( !‪IS_TRUE( self.inpain ) && isdefined( self.health ) && self.health > 0 )
139  {
140  self.inpain = true;
141 
142 
143  while ( GetTime() < self.painStartTime + time * 1000 )
144  {
145  self SetVehVelocity( self.velocity * stablizeParam );
146  self SetAngularVelocity( self GetAngularVelocity() * stablizeParam );
147  wait 0.1;
148  }
149 
150  if ( isdefined( restoreLookPoint ) && isdefined( self.health ) && self.health > 0 )
151  {
152  restoreLookEnt = ‪Spawn( "script_model", restoreLookPoint );
153  restoreLookEnt SetModel( "tag_origin" );
154 
155  self ClearLookAtEnt();
156  self SetLookAtEnt( restoreLookEnt );
157  self setTurretTargetEnt( restoreLookEnt );
158  wait 1.5;
159 
160  self ClearLookAtEnt();
161  self ClearTurretTarget();
162  restoreLookEnt delete();
163  }
164 
165  if( weapon.isEmp ) ‪remote_weapons::set_static( 0 );
166 
167  self.inpain = false;
168  }
169 }
170 
171 function ‪drone_pain( eAttacker, damageType, hitPoint, hitDirection, hitLocationInfo, partName, weapon )
172 {
173  if ( !‪IS_TRUE( self.inpain ) )
174  {
175  yaw_vel = ‪math::randomSign() * RandomFloatRange( 280, 320 );
176 
177  ang_vel = self GetAngularVelocity();
178  ang_vel += ( RandomFloatRange( -120, -100 ), yaw_vel, RandomFloatRange( -200, 200 ) );
179  self SetAngularVelocity( ang_vel );
180 
181  self thread ‪drone_pain_for_time( 0.8, 0.7, undefined, weapon );
182  }
183 }
184 
185 function ‪SentinelDamageOverride( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, weapon, vPoint, vDir, sHitLoc, vDamageOrigin, psOffsetTime, damageFromUnderneath, modelIndex, partName, vSurfaceNormal )
186 {
187  if( sMeansOfDeath == "MOD_TRIGGER_HURT" )
188  return 0;
189 
190  emp_damage = self.healthdefault * ‪SENTINEL_EMP_DAMAGE_PERCENTAGE + 0.5;
191 
192  iDamage = ‪killstreaks::OnDamagePerWeapon( ‪SENTINEL_NAME, eAttacker, iDamage, iDFlags, sMeansOfDeath, weapon, self.maxhealth, &‪destroyed_cb, self.maxhealth*0.4, &‪low_health_cb, emp_damage, undefined, true, 1.0 );
193 
194  if( isdefined( eAttacker ) && isdefined( eAttacker.team ) && eAttacker.team != self.team )
195  {
196  ‪drone_pain( eAttacker, sMeansOfDeath, vPoint, vDir, sHitLoc, partName, weapon );
197  }
198  self.damageTaken += iDamage;
199  return iDamage;
200 }
201 
202 function ‪destroyed_cb( attacker, weapon )
203 {
204  if( isdefined( attacker ) && isdefined( attacker.team ) && attacker.team != self.team )
205  self.owner.dofutz = true;
206 }
207 
208 function ‪low_health_cb( attacker, weapon )
209 {
210  if( self.playedDamaged == false )
211  {
212  self ‪killstreaks::play_pilot_dialog_on_owner( "damaged", ‪SENTINEL_NAME, self.killstreak_id );
213  self.playedDamaged = true;
214  }
215 }
216 
217 function ‪CalcSpawnOrigin( origin, angles )
218 {
219  heightOffset = ‪rcbomb::GetPlacementStartHeight();
220 
221  mins = ( -5, -5, 0 );
222  maxs = ( 5, 5, 10 );
223 
224  startPoints = [];
225  testangles = [];
226 
227  testangles[0] = ( 0, 0, 0 );
228  testangles[1] = ( 0, 30, 0 );
229  testangles[2] = ( 0, -30, 0 );
230  testangles[3] = ( 0, 60, 0 );
231  testangles[4] = ( 0, -60, 0 );
232  testangles[3] = ( 0, 90, 0 );
233  testangles[4] = ( 0, -90, 0 );
234 
235  bestOrigin = origin;
236  bestAngles = angles;
237  bestFrac = 0;
238 
239  for( i = 0; i < testangles.size; i++ )
240  {
241  startPoint = origin + ( 0, 0, heightOffset );
242  endPoint = startPoint + VectorScale( anglestoforward( ( 0, angles[1], 0 ) + testangles[i] ), ‪RCBOMB_PLACMENT_FROM_PLAYER );
243 
245  ‪trace = physicstrace( startPoint, endPoint, mins, maxs, self, mask );
246 
247  if( isdefined( ‪trace["entity"] ) && IsPlayer( ‪trace["entity"] ) )
248  continue;
249 
250  if( ‪trace["fraction"] > bestFrac )
251  {
252  bestFrac = ‪trace["fraction"];
253  bestOrigin = ‪trace["position"];
254  bestAngles = ( 0, angles[1], 0 ) + testangles[i];
255  if( bestFrac == 1 )
256  break;
257  }
258  }
259 
260  if( bestFrac > 0 )
261  {
262  if( Distance2DSquared( origin, bestOrigin ) < 20 * 20 )
263  return undefined;
264 
265  ‪trace = physicstrace( bestOrigin, bestOrigin + ( 0, 0, ‪SENTINEL_SPAWN_Z_OFFSET ), mins, maxs, self, mask );
266 
267  placement = SpawnStruct();
268  placement.origin = ‪trace["position"];
269  placement.angles = bestAngles;
270  return placement;
271  }
272  else
273  return undefined;
274 }
275 
276 function ‪ActivateSentinel( killstreakType )
277 {
278  assert( IsPlayer( self ) );
279  player = self;
280 
281  if( !IsNavVolumeLoaded() )
282  {
283  /# IPrintLnBold( "Error: NavVolume Not Loaded" ); #/
284  self iPrintLnBold( &"KILLSTREAK_SENTINEL_NOT_AVAILABLE" );
285  return false;
286  }
287 
288  if( player IsPlayerSwimming() )
289  {
290  self iPrintLnBold( &"KILLSTREAK_SENTINEL_NOT_PLACEABLE" );
291  return false;
292  }
293 
294  spawnPos = ‪CalcSpawnOrigin( player.origin, player.angles );
295  if( !isdefined( spawnPos ) )
296  {
297  self iPrintLnBold( &"KILLSTREAK_SENTINEL_NOT_PLACEABLE" );
298  return false;
299  }
300 
301  killstreak_id = player ‪killstreakrules::killstreakStart( ‪SENTINEL_NAME, player.team, false, true );
302  if( killstreak_id == ‪INVALID_KILLSTREAK_ID )
303  {
304  return false;
305  }
306 
307  player AddWeaponStat( GetWeapon( "sentinel" ), "used", 1 );
308 
309  sentinel = SpawnVehicle( ‪SENTINEL_VEHICLE_NAME, spawnPos.origin, spawnPos.angles, "dynamic_spawn_ai" );
310 
311  sentinel ‪killstreaks::configure_team( ‪SENTINEL_NAME, killstreak_id, player, "small_vehicle", undefined, &‪ConfigureTeamPost );
313  sentinel.killstreak_id = killstreak_id;
314  sentinel.killstreak_end_time = GetTime() + ‪SENTINEL_DURATION;
315  sentinel.original_vehicle_type = sentinel.vehicletype;
316  sentinel.ignore_vehicle_underneath_splash_scalar = true;
317 
318  sentinel ‪clientfield::set( "enemyvehicle", ‪ENEMY_VEHICLE_ACTIVE );
319  sentinel.hardpointType = ‪SENTINEL_NAME;
320  sentinel.soundmod = "player";
321 
324  sentinel.health = sentinel.maxhealth;
326  sentinel.rocketDamage = ( sentinel.maxhealth / ‪SENTINEL_MISSILES_TO_DESTROY ) + 1;
327  sentinel.playedDamaged = false;
328  sentinel.treat_owner_damage_as_friendly_fire = true;
329  sentinel.ignore_team_kills = true;
330  sentinel thread ‪HealthMonitor();
331 
332  sentinel.goalradius = ‪SENTINEL_MAX_DISTANCE_FROM_OWNER;
333  sentinel.goalHeight = 500;
334  //sentinel SetGoal( player, false, sentinel.goalRadius, sentinel.goalHeight );
335  sentinel.enable_guard = true;
336  sentinel.always_face_enemy = true;
337 
339  sentinel thread ‪WatchWater();
340  sentinel thread ‪WatchDeath();
341  sentinel thread ‪WatchShutdown();
342 
343  player ‪remote_weapons::UseRemoteWeapon( sentinel, ‪SENTINEL_NAME, false );
344 
345  sentinel ‪killstreaks::play_pilot_dialog_on_owner( "arrive", ‪SENTINEL_NAME, killstreak_id );
346 
348  sentinel ‪vehicle::add_to_target_group( sentinel );
349 
350  self ‪killstreaks::play_killstreak_start_dialog( ‪SENTINEL_NAME, self.team, killstreak_id );
351 
352  sentinel thread ‪WatchGameEnded();
353 
354  return true;
355 }
356 
357 function ‪HackedCallbackPre( hacker )
358 {
359  sentinel = self;
360  sentinel.owner unlink();
361  sentinel ‪clientfield::set( "vehicletransition", 0 );
362  if( sentinel.controlled === true )
363  ‪visionset_mgr::deactivate( "visionset", ‪SENTINEL_VISIONSET_ALIAS, sentinel.owner );
364  sentinel.owner ‪remote_weapons::RemoveAndAssignNewRemoteControlTrigger( sentinel.useTrigger );
366  ‪EndSentinelRemoteControl( sentinel, true );
367 }
368 
369 function ‪HackedCallbackPost( hacker )
370 {
371  sentinel = self;
372 
373  hacker ‪remote_weapons::UseRemoteWeapon( sentinel, ‪SENTINEL_NAME, false );
374  sentinel notify("WatchRemoteControlDeactivate_remoteWeapons");
375  sentinel.killstreak_end_time = hacker ‪killstreak_hacking::set_vehicle_drivable_time_starting_now( sentinel );
376 }
377 
379 {
380  sentinel = self;
381  sentinel thread ‪WatchTeamChange();
382 }
383 
385 {
386  sentinel = self;
387  sentinel endon( "death" );
388 
389  level waittill("game_ended");
390 
391  sentinel.abandoned = true;
392  sentinel.selfDestruct = true;
393  sentinel notify( ‪SENTINEL_SHUTOWN_NOTIFY );
394 }
395 
396 function ‪StartSentinelRemoteControl( sentinel )
397 {
398  player = self;
399  assert( IsPlayer( player ) );
400 
401  sentinel UseVehicle( player, 0 );
402 
403  sentinel ‪clientfield::set( "vehicletransition", 1 );
404  sentinel thread ‪audio::sndUpdateVehicleContext(true);
405  sentinel thread ‪vehicle::monitor_missiles_locked_on_to_me( player );
406 
407  sentinel.inHeliProximity = false;
408  sentinel.treat_owner_damage_as_friendly_fire = false;
409  sentinel.ignore_team_kills = false;
410 
411  minHeightOverride = undefined;
412  minz_struct = ‪struct::get( "vehicle_oob_minz", "targetname");
413  if( isdefined( minz_struct ) )
414  minHeightOverride = minz_struct.origin[2];
415 
416  sentinel thread ‪qrdrone::QRDrone_watch_distance( ‪SENTINEL_MAX_HEIGHT_OFFSET, minHeightOverride );
417  sentinel.distance_shutdown_override = &‪SentinelDistanceFailure;
418 
419  player ‪vehicle::set_vehicle_drivable_time( ‪SENTINEL_DURATION, sentinel.killstreak_end_time );
420  ‪visionset_mgr::activate( "visionset", ‪SENTINEL_VISIONSET_ALIAS, player, 1, 90000, 1 );
421 
422  if ( isdefined( sentinel.PlayerDrivenVersion ) )
423  sentinel SetVehicleType( sentinel.PlayerDrivenVersion );
424 }
425 
426 function ‪EndSentinelRemoteControl( sentinel, exitRequestedByOwner )
427 {
428  sentinel.treat_owner_damage_as_friendly_fire = true;
429  sentinel.ignore_team_kills = true;
430 
431  if ( isdefined( sentinel.owner ) )
432  {
434  if( sentinel.controlled === true )
435  ‪visionset_mgr::deactivate( "visionset", ‪SENTINEL_VISIONSET_ALIAS, sentinel.owner );
436  }
437 
438  if( exitRequestedByOwner )
439  {
440  if ( isdefined( sentinel.owner ) )
441  {
442  sentinel.owner ‪qrdrone::destroyHud();
443  sentinel.owner unlink();
444  sentinel ‪clientfield::set( "vehicletransition", 0 );
445  }
446  sentinel thread ‪audio::sndUpdateVehicleContext(false);
447  }
448 
449  if ( isdefined( sentinel.original_vehicle_type ) )
450  sentinel SetVehicleType( sentinel.original_vehicle_type );
451 
452 }
453 
454 function ‪OnTimeout()
455 {
456  sentinel = self;
457 
459 
460  params = level.killstreakBundle[‪SENTINEL_NAME];
461 
462  if( isdefined( sentinel.owner ) )
463  {
464  RadiusDamage( sentinel.origin,
465  params.ksExplosionOuterRadius,
466  params.ksExplosionInnerDamage,
467  params.ksExplosionOuterDamage,
468  sentinel.owner,
469  "MOD_EXPLOSIVE",
470  GetWeapon( ‪SENTINEL_NAME ) );
471  if( isdefined( params.ksExplosionRumble ) )
472  sentinel.owner PlayRumbleOnEntity( params.ksExplosionRumble );
473  }
474 
475  sentinel notify( ‪SENTINEL_SHUTOWN_NOTIFY );
476 }
477 
479 {
480  self endon( "death" );
481 
482  params = level.killstreakBundle[‪SENTINEL_NAME];
483 
484  if( isdefined( params.fxLowHealth ) )
485  {
486  while( 1 )
487  {
488  if( self.lowhealth > self.health )
489  {
490  PlayFXOnTag( params.fxLowHealth, self, "tag_origin" );
491  break;
492  }
494  }
495  }
496 }
497 
499 {
500  sentinel = self;
501 
502  sentinel notify( ‪SENTINEL_SHUTOWN_NOTIFY );
503 }
504 
505 function ‪WatchDeath()
506 {
507  sentinel = self;
508  sentinel waittill( "death", attacker, damageFromUnderneath, weapon, point, dir, modType );
509  sentinel notify( ‪SENTINEL_SHUTOWN_NOTIFY );
510 
511  attacker = self [[ level.figure_out_attacker ]]( attacker );
512  if ( isdefined( attacker ) && ( !isdefined( self.owner ) || self.owner ‪util::IsEnemyPlayer( attacker ) ) )
513  {
514  if ( isPlayer( attacker ) )
515  {
516  ‪challenges::destroyedAircraft( attacker, weapon, sentinel.controlled === true );
517  attacker ‪challenges::addFlySwatterStat( weapon, self );
518  attacker AddWeaponStat( weapon, "destroy_aitank_or_setinel", 1 );
519  ‪scoreevents::processScoreEvent( "destroyed_sentinel", attacker, sentinel.owner, weapon );
520  if ( modType == "MOD_RIFLE_BULLET" || modType == "MOD_PISTOL_BULLET" )
521  {
522  attacker addPlayerStat( "shoot_down_sentinel", 1 );
523  }
524  LUINotifyEvent( &"player_callout", 2, &"KILLSTREAK_DESTROYED_SENTINEL", attacker.entnum );
525  }
526 
527  if ( isdefined( sentinel ) && isdefined( sentinel.owner ) )
528  {
529  sentinel ‪killstreaks::play_destroyed_dialog_on_owner( ‪SENTINEL_NAME, sentinel.killstreak_id );
530  }
531  }
532 }
533 
535 {
536  self notify( "Sentinel_WatchTeamChange_Singleton" );
537  self endon ( "Sentinel_WatchTeamChange_Singleton" );
538  sentinel = self;
539 
540  sentinel endon( ‪SENTINEL_SHUTOWN_NOTIFY );
541  sentinel.owner ‪util::waittill_any( "joined_team", "disconnect", "joined_spectators" );
542  sentinel notify( ‪SENTINEL_SHUTOWN_NOTIFY );
543 }
544 
545 #define SENTINEL_IN_WATER_TRACE_MINS ( -2, -2, -2 )
546 #define SENTINEL_IN_WATER_TRACE_MAXS ( 2, 2, 2 )
547 #define SENTINEL_IN_WATER_TRACE_MASK ( PHYSICS_TRACE_MASK_WATER )
548 #define SENTINEL_IN_WATER_TRACE_WAIT ( 0.1 )
549 
550 function ‪WatchWater()
551 {
552  sentinel = self;
553  sentinel endon( ‪SENTINEL_SHUTOWN_NOTIFY );
554 
555  while( true )
556  {
558  ‪trace = physicstrace( self.origin + ( 0, 0, 10 ), self.origin + ( 0, 0, 6 ), ‪SENTINEL_IN_WATER_TRACE_MINS, ‪SENTINEL_IN_WATER_TRACE_MAXS, self, ‪SENTINEL_IN_WATER_TRACE_MASK);
559  if( ‪trace["fraction"] < 1.0 )
560  break;
561  }
562 
563  sentinel notify( ‪SENTINEL_SHUTOWN_NOTIFY );
564 }
565 
567 {
568  sentinel = self;
569 
570  sentinel waittill( ‪SENTINEL_SHUTOWN_NOTIFY );
571 
572  if( ‪IS_TRUE( sentinel.control_initiated ) || ‪IS_TRUE( sentinel.controlled ) )
573  {
575  while( ‪IS_TRUE( sentinel.control_initiated ) || ‪IS_TRUE( sentinel.controlled ) )
577  }
578 
579  if( isdefined( sentinel.owner ) )
580  {
581  sentinel.owner ‪qrdrone::destroyHud();
582  }
583 
584  ‪killstreakrules::killstreakStop( ‪SENTINEL_NAME, sentinel.originalTeam, sentinel.killstreak_id );
585 
586  if( isalive( sentinel ) )
587  sentinel Kill();
588 }
‪monitor_missiles_locked_on_to_me
‪function monitor_missiles_locked_on_to_me(player, wait_time=0.1)
Definition: vehicle_shared.gsc:3617
‪processScoreEvent
‪function processScoreEvent(event, player, victim, weapon)
Definition: scoreevents_shared.gsc:19
‪UseRemoteWeapon
‪function UseRemoteWeapon(weapon, weaponName, immediate, allowManualDeactivation=true, always_allow_ride=false)
Definition: _remote_weapons.gsc:74
‪add_interrupt_connection
‪function add_interrupt_connection(from_state_name, to_state_name, on_notify, checkfunc)
Definition: statemachine_shared.gsc:90
‪set_static
‪function set_static(val)
Definition: _remote_weapons.gsc:513
‪activate
‪function activate()
Definition: traps_shared.gsc:655
‪add_state
‪function add_state(name, enter_func, update_func, exit_func, reenter_func)
Definition: statemachine_shared.gsc:59
‪SENTINEL_HIDE_COMPASS_ON_REMOTE_CONTROL
‪#define SENTINEL_HIDE_COMPASS_ON_REMOTE_CONTROL
Definition: _killstreaks.gsh:330
‪WatchShutdown
‪function WatchShutdown()
Definition: _sentinel.gsc:566
‪randomSign
‪function randomSign()
Definition: math_shared.gsc:179
‪WaitForTimeout
‪function WaitForTimeout(killstreak, duration, callback, endCondition1, endCondition2, endCondition3)
Definition: _killstreaks.gsc:2913
‪SentinelDistanceFailure
‪function SentinelDistanceFailure()
Definition: _sentinel.gsc:498
‪state_combat_enter
‪function state_combat_enter(params)
Definition: _flak_drone.gsc:204
‪SENTINEL_SHUTOWN_NOTIFY
‪#define SENTINEL_SHUTOWN_NOTIFY
Definition: _sentinel.gsc:58
‪drone_pain_for_time
‪function drone_pain_for_time(time, stablizeParam, restoreLookPoint, weapon)
Definition: _sentinel.gsc:132
‪driving_enter
‪function driving_enter(params)
Definition: _sentinel.gsc:127
‪StartSentinelRemoteControl
‪function StartSentinelRemoteControl(sentinel)
Definition: _sentinel.gsc:396
‪ramp_in_out_thread_per_player_death_shutdown
‪function ramp_in_out_thread_per_player_death_shutdown(player, ramp_in, full_period, ramp_out)
Definition: visionset_mgr_shared.gsc:385
‪stop_monitor_missiles_locked_on_to_me
‪function stop_monitor_missiles_locked_on_to_me()
Definition: vehicle_shared.gsc:3640
‪nudge_collision
‪function nudge_collision()
Definition: vehicle_ai_shared.gsc:437
‪MissileTarget_ProximityDetonateIncomingMissile
‪function MissileTarget_ProximityDetonateIncomingMissile(endon1, endon2, allowDirectDamage)
Definition: _heatseekingmissile.gsc:1085
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪SENTINEL_HOVER_RADIUS
‪#define SENTINEL_HOVER_RADIUS
Definition: _killstreaks.gsh:285
‪play_killstreak_start_dialog
‪function play_killstreak_start_dialog(killstreakType, team, killstreakId)
Definition: _killstreaks.gsc:1905
‪state_combat_update
‪function state_combat_update(params)
Definition: _flak_drone.gsc:208
‪defaultstate_driving_enter
‪function defaultstate_driving_enter(params)
Definition: vehicle_ai_shared.gsc:1742
‪WatchTeamChange
‪function WatchTeamChange()
Definition: _sentinel.gsc:534
‪play_pilot_dialog_on_owner
‪function play_pilot_dialog_on_owner(dialogKey, killstreakType, killstreakId)
Definition: _killstreaks.gsc:2010
‪OnDamagePerWeapon
‪function OnDamagePerWeapon(killstreak_ref, attacker, damage, flags, type, weapon, max_health, destroyed_callback, low_health, low_health_callback, emp_damage, emp_callback, allow_bullet_damage, chargeLevel)
Definition: _killstreaks.gsc:2667
‪SENTINEL_EMP_DAMAGE_PERCENTAGE
‪#define SENTINEL_EMP_DAMAGE_PERCENTAGE
Definition: _killstreaks.gsh:305
‪RCBOMB_PLACMENT_FROM_PLAYER
‪#define RCBOMB_PLACMENT_FROM_PLAYER
Definition: _killstreaks.gsh:311
‪trace
‪function trace(from, to, target)
Definition: grapple.gsc:369
‪addFlySwatterStat
‪function addFlySwatterStat(weapon, aircraft)
Definition: challenges_shared.gsc:86
‪ENEMY_VEHICLE_ACTIVE
‪#define ENEMY_VEHICLE_ACTIVE
Definition: _hacker_tool.gsh:2
‪SentinelDamageOverride
‪function SentinelDamageOverride(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, weapon, vPoint, vDir, sHitLoc, vDamageOrigin, psOffsetTime, damageFromUnderneath, modelIndex, partName, vSurfaceNormal)
Definition: _sentinel.gsc:185
‪destroyHud
‪function destroyHud()
Definition: _qrdrone.gsc:1608
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪get
‪function get(kvp_value, kvp_key="targetname")
Definition: struct.csc:13
‪state_guard_enter
‪function state_guard_enter(params)
Definition: _wasp.gsc:530
‪ActivateSentinel
‪function ActivateSentinel(killstreakType)
Definition: _sentinel.gsc:276
‪state_death_update
‪function state_death_update(params)
Definition: _flak_drone.gsc:321
‪RegisterRemoteWeapon
‪function RegisterRemoteWeapon(weaponName, hintString, useCallback, endUseCallback, hideCompassOnUse=true)
Definition: _remote_weapons.gsc:63
‪InitSentinel
‪function InitSentinel()
Definition: _sentinel.gsc:77
‪get_low_health
‪function get_low_health(killstreakType)
Definition: _killstreak_bundles.gsc:195
‪sndUpdateVehicleContext
‪function sndUpdateVehicleContext(added)
Definition: audio_shared.gsc:74
‪IsEnemyPlayer
‪function IsEnemyPlayer(player)
Definition: util_shared.csc:1220
‪QRDrone_watch_distance
‪function QRDrone_watch_distance()
Definition: _qrdrone.csc:400
‪RemoveAndAssignNewRemoteControlTrigger
‪function RemoveAndAssignNewRemoteControlTrigger(remoteControlTrigger)
Definition: _remote_weapons.gsc:38
‪GetPlacementStartHeight
‪function GetPlacementStartHeight()
Definition: _rcbomb.gsc:497
‪StartInitialState
‪function StartInitialState(defaultState="combat")
Definition: vehicle_ai_shared.gsc:866
‪set_vehicle_drivable_time
‪function set_vehicle_drivable_time(duration_ms, end_time_ms)
Definition: vehicle_shared.gsc:3703
‪SENTINEL_IN_WATER_TRACE_WAIT
‪#define SENTINEL_IN_WATER_TRACE_WAIT
Definition: _sentinel.gsc:548
‪drone_pain
‪function drone_pain(eAttacker, damageType, hitPoint, hitDirection, hitLocationInfo, partName, weapon)
Definition: _sentinel.gsc:171
‪SENTINEL_SPAWN_Z_OFFSET
‪#define SENTINEL_SPAWN_Z_OFFSET
Definition: _killstreaks.gsh:304
‪CalcSpawnOrigin
‪function CalcSpawnOrigin(origin, angles)
Definition: _sentinel.gsc:217
‪destroyedAircraft
‪function destroyedAircraft(attacker, weapon, playerControlled)
Definition: challenges_shared.gsc:1405
‪low_health_cb
‪function low_health_cb(attacker, weapon)
Definition: _sentinel.gsc:208
‪friendly_fire_shield
‪function friendly_fire_shield()
Definition: vehicle_shared.gsc:2194
‪WatchDeath
‪function WatchDeath()
Definition: _sentinel.gsc:505
‪play_destroyed_dialog_on_owner
‪function play_destroyed_dialog_on_owner(killstreakType, killstreakId)
Definition: _killstreaks.gsc:1982
‪init
‪function init()
Definition: _sentinel.gsc:60
‪SENTINEL_VISIONSET_ALIAS
‪#define SENTINEL_VISIONSET_ALIAS
Definition: _killstreaks.gsh:339
‪SENTINEL_VEHICLE_NAME
‪#define SENTINEL_VEHICLE_NAME
Definition: _killstreaks.gsh:281
‪init_state_machine_for_role
‪function init_state_machine_for_role(rolename)
Definition: vehicle_ai_shared.gsc:1034
‪waittill_any
‪function waittill_any(str_notify1, str_notify2, str_notify3, str_notify4, str_notify5)
Definition: util_shared.csc:375
‪deactivate
‪function deactivate()
Definition: traps_shared.gsc:649
‪SENTINEL_IN_WATER_TRACE_MINS
‪#define SENTINEL_IN_WATER_TRACE_MINS
Definition: _sentinel.gsc:545
‪get_max_health
‪function get_max_health(killstreakType)
Definition: _killstreak_bundles.gsc:188
‪EndSentinelRemoteControl
‪function EndSentinelRemoteControl(sentinel, exitRequestedByOwner)
Definition: _sentinel.gsc:426
‪SENTINEL_IN_WATER_TRACE_MASK
‪#define SENTINEL_IN_WATER_TRACE_MASK
Definition: _sentinel.gsc:547
‪WatchWater
‪function WatchWater()
Definition: _sentinel.gsc:550
‪ConfigureTeamPost
‪function ConfigureTeamPost(owner, isHacked)
Definition: _sentinel.gsc:378
‪register_dialog
‪function register_dialog(killstreakType, informDialog, taacomDialogBundleKey, pilotDialogArrayKey, startDialogKey, enemyStartDialogKey, enemyStartMultipleDialogKey, hackedDialogKey, hackedStartDialogKey, requestDialogKey, threatDialogKey, isInventory)
Definition: _killstreaks.gsc:239
‪state_guard_exit
‪function state_guard_exit(params)
Definition: _wasp.gsc:548
‪INVALID_KILLSTREAK_ID
‪#define INVALID_KILLSTREAK_ID
Definition: _killstreaks.gsh:2
‪SENTINEL_DURATION
‪#define SENTINEL_DURATION
Definition: _killstreaks.gsh:283
‪PHYSICS_TRACE_MASK_PHYSICS
‪#define PHYSICS_TRACE_MASK_PHYSICS
Definition: shared.gsh:130
‪PHYSICS_TRACE_MASK_VEHICLE
‪#define PHYSICS_TRACE_MASK_VEHICLE
Definition: shared.gsh:131
‪set_vehicle_drivable_time_starting_now
‪function set_vehicle_drivable_time_starting_now(killstreak, duration_ms=(-1))
Definition: _killstreak_hacking.gsc:140
‪add_to_target_group
‪function add_to_target_group(target_ent)
Definition: vehicle_shared.gsc:3603
‪SENTINEL_NAME
‪#define SENTINEL_NAME
Definition: _sentinel.gsc:56
‪Spawn
‪function Spawn(parent, onDeathCallback)
Definition: _flak_drone.gsc:427
‪SENTINEL_MAX_DISTANCE_FROM_OWNER
‪#define SENTINEL_MAX_DISTANCE_FROM_OWNER
Definition: _killstreaks.gsh:302
‪destroyed_cb
‪function destroyed_cb(attacker, weapon)
Definition: _sentinel.gsc:202
‪SENTINEL_MISSILES_TO_DESTROY
‪#define SENTINEL_MISSILES_TO_DESTROY
Definition: _killstreaks.gsh:306
‪register_strings
‪function register_strings(killstreakType, receivedText, notUsableText, inboundText, inboundNearPlayerText, hackedText, utilizesAirspace=true, isInventory=false)
Definition: _killstreaks.gsc:223
‪killstreakStop
‪function killstreakStop(hardpointType, team, id)
Definition: _killstreakrules.gsc:293
‪state_guard_update
‪function state_guard_update(params)
Definition: _wasp.gsc:590
‪get_hacked_health
‪function get_hacked_health(killstreakType)
Definition: _killstreak_bundles.gsc:202
‪init_guard_points
‪function init_guard_points()
Definition: _wasp.gsc:427
‪register_info
‪function register_info(type, name, version, lerp_step_count)
Definition: visionset_mgr_shared.csc:334
‪SENTINEL_HOVER_SPEED
‪#define SENTINEL_HOVER_SPEED
Definition: _killstreaks.gsh:286
‪SENTINEL_IN_WATER_TRACE_MAXS
‪#define SENTINEL_IN_WATER_TRACE_MAXS
Definition: _sentinel.gsc:546
‪SENTINEL_MAX_HEIGHT_OFFSET
‪#define SENTINEL_MAX_HEIGHT_OFFSET
Definition: _killstreaks.gsh:303
‪killstreakStart
‪function killstreakStart(hardpointType, team, hacked, displayTeamMessage)
Definition: _killstreakrules.gsc:184
‪state_guard_can_enter
‪function state_guard_can_enter(from_state, to_state, connection)
Definition: _wasp.gsc:503
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪HackedCallbackPost
‪function HackedCallbackPost(hacker)
Definition: _sentinel.gsc:369
‪SENTINEL_HOVER_ACCELERATION
‪#define SENTINEL_HOVER_ACCELERATION
Definition: _killstreaks.gsh:287
‪vehicleSpawnContext
‪function vehicleSpawnContext()
Definition: audio_shared.gsc:70
‪configure_team
‪function configure_team(killstreakType, killstreakId, owner, influencerType, configureTeamPreFunction, configureTeamPostFunction, isHacked=false)
Definition: _killstreaks.gsc:2806
‪add_utility_connection
‪function add_utility_connection(from_state_name, to_state_name, checkfunc, defaultScore)
Definition: statemachine_shared.gsc:112
‪EndRemoteControlWeaponUse
‪function EndRemoteControlWeaponUse(exitRequestedByOwner)
Definition: _remote_weapons.gsc:369
‪register_alt_weapon
‪function register_alt_weapon(killstreakType, weaponName, isInventory)
Definition: _killstreaks.gsc:318
‪create_flare_ent
‪function create_flare_ent(offset)
Definition: _helicopter.gsc:645
‪WatchGameEnded
‪function WatchGameEnded()
Definition: _sentinel.gsc:384
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪get_script_bundle
‪function get_script_bundle(str_type, str_name)
Definition: struct.csc:45
‪OnTimeout
‪function OnTimeout()
Definition: _sentinel.gsc:454
‪init_target_group
‪function init_target_group()
Definition: vehicle_shared.gsc:3598
‪enable_hacking
‪function enable_hacking(killstreakName, preHackFunction, postHackFunction)
Definition: _killstreak_hacking.gsc:22
‪HackedCallbackPre
‪function HackedCallbackPre(hacker)
Definition: _sentinel.gsc:357
‪SENTINEL_NEAR_GOAL_NOTIFY_DIST
‪#define SENTINEL_NEAR_GOAL_NOTIFY_DIST
Definition: _killstreaks.gsh:284
‪isHacked
‪function isHacked()
Definition: util_shared.gsc:2493
‪HealthMonitor
‪function HealthMonitor()
Definition: _sentinel.gsc:478
‪get_state_callbacks
‪function get_state_callbacks(statename)
Definition: vehicle_ai_shared.gsc:927
‪WAIT_SERVER_FRAME
‪#define WAIT_SERVER_FRAME
Definition: shared.gsh:265