‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_helicopter.csc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\clientfield_shared;
4 #using scripts\shared\math_shared;
5 #using scripts\shared\system_shared;
6 #using scripts\shared\util_shared;
7 #using scripts\shared\vehicle_shared;
8 #using scripts\shared\callbacks_shared;
9 
10 #insert scripts\shared\shared.gsh;
11 #insert scripts\shared\version.gsh;
12 
13 #using scripts\mp\_helicopter_sounds;
14 #using scripts\mp\_util;
15 
16 #insert scripts\mp\killstreaks\_killstreaks.gsh;
17 
18 #using scripts\shared\duplicaterender_mgr;
19 #insert scripts\shared\duplicaterender.gsh;
20 
21 #precache( "client_fx", "killstreaks/fx_heli_smk_trail_engine_33" );
22 #precache( "client_fx", "killstreaks/fx_heli_smk_trail_engine_66" );
23 #precache( "client_fx", "killstreaks/fx_drgnfire_rotor_wash_runner" );
24 #precache( "client_fx", "killstreaks/fx_ed_lights_green" );
25 #precache( "client_fx", "killstreaks/fx_ed_lights_red" );
26 #precache( "client_fx", "killstreaks/fx_sc_lights_grn" );
27 #precache( "client_fx", "killstreaks/fx_sc_lights_red" );
28 #precache( "client_fx", "killstreaks/fx_vtol_lights_grn" );
29 #precache( "client_fx", "killstreaks/fx_vtol_lights_red" );
30 #precache( "client_fx", "killstreaks/fx_vtol_thruster" );
31 #precache( "client_fx", "killstreaks/fx_drone_hunter_lights" );
32 
33 #using_animtree( "mp_vehicles" );
34 
35 #namespace helicopter;
36 
37 #define ACTIVE_CAMO_NORMAL "mc/hud_outline_predator_camo_active_enemy_scorestreak"
38 #define ACTIVE_CAMO_FLICKER "mc/hud_outline_predator_camo_disruption_enemy_scorestreak"
39 #define ACTIVE_CAMO_REVEAL "mc/hud_outline_predator_scorestreak"
40 
41 #define CAMO_REVEAL_TIME 0.5
42 #define CAMO_TURNOFF_MODEL_RENDER .5
43 
44 ‪REGISTER_SYSTEM( "helicopter", &‪__init__, undefined )
45 
46 function ‪__init__()
47 {
48  level.chopper_fx["damage"]["light_smoke"] = "killstreaks/fx_heli_smk_trail_engine_33";
49  level.chopper_fx["damage"]["heavy_smoke"] = "killstreaks/fx_heli_smk_trail_engine_66";
50 
51  level._effect["qrdrone_prop"] = "killstreaks/fx_drgnfire_rotor_wash_runner";
52  level._effect["heli_guard_light"]["friendly"] = "killstreaks/fx_sc_lights_grn";
53  level._effect["heli_guard_light"]["enemy"] = "killstreaks/fx_sc_lights_red";
54  level._effect["heli_comlink_light"]["common"] = "killstreaks/fx_drone_hunter_lights";
55  level._effect["heli_gunner_light"]["friendly"] = "killstreaks/fx_vtol_lights_grn";
56  level._effect["heli_gunner_light"]["enemy"] = "killstreaks/fx_vtol_lights_red";
57 
58  level._effect["heli_gunner"]["vtol_fx"] = "killstreaks/fx_vtol_thruster";
59  level._effect["heli_gunner"]["vtol_fx_ft"] = "killstreaks/fx_vtol_thruster";
60 
64 
67 
69 
70 
74 
77 
79 
81  ‪duplicate_render::set_dr_filter_framebuffer( "active_camo_flicker_scorestreak", 80, "active_camo_flicker", "", ‪DR_TYPE_FRAMEBUFFER, ‪ACTIVE_CAMO_FLICKER, ‪DR_CULL_ALWAYS );
82  ‪duplicate_render::set_dr_filter_framebuffer_duplicate( "active_camo_reveal_scorestreak_dr", 90, "active_camo_reveal", "hide_model", ‪DR_TYPE_FRAMEBUFFER_DUPLICATE, ‪ACTIVE_CAMO_NORMAL, ‪DR_CULL_ALWAYS );
83  ‪duplicate_render::set_dr_filter_framebuffer( "active_camo_reveal_scorestreak", 80, "active_camo_reveal,hide_model", "", ‪DR_TYPE_FRAMEBUFFER, ‪ACTIVE_CAMO_REVEAL, ‪DR_CULL_ALWAYS );
84 
87 
89 
92 
94 
96 }
97 
98 function ‪on_player_spawned( localClientNum )
99 {
100  player = self;
101  player waittill( "entityshutdown" );
102  player.markerFX = undefined;
103  if( isdefined( player.markerObj ) )
104  {
105  player.markerObj Delete();
106  }
107  if( isdefined( player.markerFXHandle ) )
108  {
109  KillFX( localClientNum, player.markerFXHandle );
110  player.markerFXHandle = undefined;
111  }
112 }
113 
115 {
116  if ( self HasAnimTree() == false )
117  self UseAnimTree( #animtree );
118 }
119 
120 function ‪active_camo_changed( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
121 {
122  if( newVal == ‪HELICOPTER_CAMO_STATE_OFF )
123  {
125  }
126  else
127  {
128  self ‪heli_comlink_lights_off( localClientNum );
129  }
130 
131  flags_changed = self ‪duplicate_render::set_dr_flag( "active_camo_flicker", newVal == ‪HELICOPTER_CAMO_STATE_FLICKER );
132  flags_changed = self ‪duplicate_render::set_dr_flag( "active_camo_on", false ) || flags_changed;
133  flags_changed = self ‪duplicate_render::set_dr_flag( "active_camo_reveal", true ) || flags_changed;
134 
135  if ( flags_changed )
136  {
137  self ‪duplicate_render::update_dr_filters(localClientNum);
138  }
139 
140  self notify( "endtest" );
141 
142  self thread ‪doReveal( localClientNum, newVal != ‪HELICOPTER_CAMO_STATE_OFF );
143 }
144 
145 function ‪doReveal( local_client_num, direction )
146 {
147  self notify( "endtest" );
148  self endon( "endtest" );
149 
150  self endon( "entityshutdown" );
151 
152  if( direction )
153  {
154  self ‪duplicate_render::update_dr_flag( local_client_num, "hide_model", false );
155  startVal = 0;
156  endVal = 1;
157  }
158  else
159  {
160  self ‪duplicate_render::update_dr_flag( local_client_num, "hide_model", true );
161  startVal = 1;
162  endVal = 0;
163  }
164 
165  priorValue = startVal;
166  while( ( startVal >= 0 ) && ( startVal <= 1 ) )
167  {
168  self MapShaderConstant( local_client_num, 0, "scriptVector0", startVal, 0, 0, 0 );
169  if( direction )
170  {
171  startVal += ‪CLIENT_FRAME / ‪CAMO_REVEAL_TIME;
172  if( ( priorValue < ‪CAMO_TURNOFF_MODEL_RENDER ) && ( startVal >= ‪CAMO_TURNOFF_MODEL_RENDER ) )
173  {
174  self ‪duplicate_render::set_dr_flag( "hide_model", true );
175  self ‪duplicate_render::change_dr_flags(local_client_num);
176  }
177  }
178  else
179  {
180  startVal -= ‪CLIENT_FRAME / ‪CAMO_REVEAL_TIME;
181  if( ( priorValue > ‪CAMO_TURNOFF_MODEL_RENDER ) && ( startVal <= ‪CAMO_TURNOFF_MODEL_RENDER ) )
182  {
183  self ‪duplicate_render::set_dr_flag( "hide_model", false );
184  self ‪duplicate_render::change_dr_flags(local_client_num);
185  }
186  }
187  priorValue = startVal;
188  wait( ‪CLIENT_FRAME );
189  }
190  self MapShaderConstant( local_client_num, 0, "scriptVector0", endVal, 0, 0, 0 );
191 
192  flags_changed = self ‪duplicate_render::set_dr_flag( "active_camo_reveal", false );
193  flags_changed = self ‪duplicate_render::set_dr_flag( "active_camo_on", direction ) || flags_changed;
194  if ( flags_changed )
195  {
196  self ‪duplicate_render::update_dr_filters(local_client_num);
197  }
198 }
199 
200 function ‪heli_comlink_bootup_anim( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
201 {
202  self endon( "entityshutdown" );
203  self endon( "death" );
204 
205  self ‪SetupAnimTree();
206  self SetAnim( %veh_anim_future_heli_gearup_bay_open, 1.0, 0.0, 1.0 );
207 }
208 
209 function ‪supplydrop_care_package_state( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
210 {
211  self endon( "entityshutdown" );
212  self endon( "death" );
213  self ‪SetupAnimTree();
214  if ( newVal == 1 )
215  {
216  self SetAnim( %o_drone_supply_care_idle, 1.0, 0.0, 1.0 );
217  }
218  else
219  {
220  self SetAnim( %o_drone_supply_care_drop, 1.0, 0.0, 0.3 );
221  }
222 }
223 
224 function ‪supplydrop_ai_tank_state( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
225 {
226  self endon( "entityshutdown" );
227  self endon( "death" );
228  self ‪SetupAnimTree();
229 
230  if ( newVal == 1 )
231  {
232  self SetAnim( %o_drone_supply_agr_idle, 1.0, 0.0, 1.0 );
233  }
234  else
235  {
236  self SetAnim( %o_drone_supply_agr_drop, 1.0, 0.0, 0.3 );
237  }
238 }
239 
240 function ‪warnMissileLocking( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
241 {
242  if ( newVal && !(self IsLocalClientDriver(localClientNum)) )
243  return;
244 
246 }
247 
248 function ‪warnMissileLocked( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
249 {
250  if ( newVal && !(self IsLocalClientDriver(localClientNum)) )
251  return;
252 
254 }
255 
256 function ‪warnMissileFired( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
257 {
258  if ( newVal && !(self IsLocalClientDriver(localClientNum)) )
259  return;
260 
262 }
263 
264 function ‪heli_deletefx(localClientNum)
265 {
266  if (isdefined(self.exhaustLeftFxHandle))
267  {
268  deletefx( localClientNum, self.exhaustLeftFxHandle );
269  self.exhaustLeftFxHandle = undefined;
270  }
271 
272  if (isdefined(self.exhaustRightFxHandlee))
273  {
274  deletefx( localClientNum, self.exhaustRightFxHandle );
275  self.exhaustRightFxHandle = undefined;
276  }
277 
278  if (isdefined(self.lightFXID))
279  {
280  deletefx( localClientNum, self.lightFXID );
281  self.lightFXID = undefined;
282  }
283 
284  if (isdefined(self.propFXID))
285  {
286  deletefx( localClientNum, self.propFXID );
287  self.propFXID = undefined;
288  }
289 
290  if (isdefined(self.vtolLeftFXID))
291  {
292  deletefx( localClientNum, self.vtolLeftFXID );
293  self.vtolLeftFXID = undefined;
294  }
295 
296  if (isdefined(self.vtolRightFXID))
297  {
298  deletefx( localClientNum, self.vtolRightFXID );
299  self.vtolRightFXID = undefined;
300  }
301 
302 }
303 
304 function ‪startfx(localClientNum)
305 {
306  self endon( "entityshutdown" );
307 
308  if ( isdefined( self.vehicletype ) )
309  {
310  if ( self.vehicletype == "remote_mortar_vehicle_mp" )
311  {
312  return;
313  }
314 
315  if ( self.vehicletype == "vehicle_straferun_mp" )
316  {
317  return;
318  }
319  }
320 
321  if( isdefined( self.exhaustfxname ) && self.exhaustfxname != "" )
322  {
323  self.exhaustFx = self.exhaustfxname;
324  }
325 
326  if( isdefined(self.exhaustFx) )
327  {
328  self.exhaustLeftFxHandle = PlayFXOnTag( localClientNum, self.exhaustFx, self, "tag_engine_left" );
329  if( !‪IS_TRUE( self.oneexhaust ) )//TODO T7 - not sure why this isn't getting set anymore
331  {
332  self.exhaustRightFxHandle = PlayFXOnTag( localClientNum, self.exhaustFx, self, "tag_engine_right" );
333  }
334  }
335  else
336  {
337  /# PrintLn("Client: _helicopter.csc - startfx() - exhaust rotor fx is not loaded"); #/
338  }
339 
340  if( isdefined( self.vehicletype ) )
341  {
342  light_fx = undefined;
343  prop_fx = undefined;
344 
345  switch( self.vehicletype )
346  {
347  case "heli_ai_mp":
348  light_fx = "heli_comlink_light";
349  break;
350  case "heli_player_gunner_mp":
351  //TODO store FX not on self to prevent edge cases where it doesnt get cleaned up
352  self.vtolLeftFXID = PlayFXOnTag( localClientNum, level._effect["heli_gunner"]["vtol_fx"], self, "tag_engine_left" );
353  self.vtolRightFXID = PlayFXOnTag( localClientNum, level._effect["heli_gunner"]["vtol_fx_ft"], self, "tag_engine_right" );
354  light_fx = "heli_gunner_light";
355  break;
356  case "heli_guard_mp":
357  light_fx = "heli_guard_light";
358  break;
359  case "qrdrone_mp":
360  prop_fx = "qrdrone_prop";
361  break;
362  };
363 
364  if ( isdefined( light_fx ) )
365  {
366  if ( self ‪util::friend_not_foe( localClientNum ) )
367  {
368  self.lightFXID = PlayFXOnTag( localClientNum, level._effect[light_fx]["friendly"], self, "tag_origin" );
369  }
370  else
371  {
372  self.lightFXID = PlayFXOnTag( localClientNum, level._effect[light_fx]["enemy"], self, "tag_origin" );
373  }
374  }
375 
376  if ( isdefined( prop_fx ) && !self IsLocalClientDriver( localClientNum ))
377  {
378  self.propFXID = PlayFXOnTag( localClientNum, level._effect[prop_fx], self, "tag_origin" );
379  }
380  }
381 
382  self ‪damage_fx_stages(localClientNum);
383 }
384 
385 function ‪startfx_loop(localClientNum)
386 {
387  self endon( "entityshutdown" );
388 
389  self thread ‪helicopter_sounds::aircraft_dustkick(localClientNum);
390 
391  ‪startfx( localClientNum );
392 
393  ‪serverTime = getServerTime( 0 );
394  lastServerTime = ‪serverTime;
395 
396  while( isdefined( self ) )
397  {
398  if (‪serverTime < lastServerTime)
399  {
400  ‪heli_deletefx( localClientNum );
401  ‪startfx( localClientNum );
402  }
403  wait( 0.05 ); // small for added granularity. any bigger and rapid time switching can cause problems.
404  lastServerTime = ‪serverTime;
405  ‪serverTime = getServerTime( 0 );
406  }
407 }
408 
409 function ‪damage_fx_stages(localClientNum)
410 {
411  self endon( "entityshutdown" );
412 
413  last_damage_state = self GetHeliDamageState();
414  fx = undefined;
415 
416  for ( ;; )
417  {
418  if ( last_damage_state != self GetHeliDamageState() )
419  {
420  if ( self GetHeliDamageState() == 2 )
421  {
422  if ( isdefined(fx) )
423  stopfx( localClientNum, fx );
424 
425  fx = ‪trail_fx( localClientNum, level.chopper_fx["damage"]["light_smoke"], "tag_engine_left" );
426  }
427  else if ( self GetHeliDamageState() == 1 )
428  {
429  if ( isdefined(fx) )
430  stopfx( localClientNum, fx );
431 
432  fx = ‪trail_fx( localClientNum, level.chopper_fx["damage"]["heavy_smoke"], "tag_engine_left" );
433  }
434  else
435  {
436  if ( isdefined(fx) )
437  stopfx( localClientNum, fx );
438 
439  self notify( "stop trail" );
440  }
441  last_damage_state = self GetHeliDamageState();
442  }
443  wait(0.25);
444  }
445 }
446 
447 function ‪trail_fx( localClientNum, ‪trail_fx, trail_tag )
448 {
449  id = playfxontag( localClientNum, ‪trail_fx, self, trail_tag );
450 
451  return id;
452 }
453 
454 function ‪heli_comlink_lights_on_after_wait( localClientNum, wait_time )
455 {
456  self endon( "entityshutdown" );
457  self endon( "heli_comlink_lights_off" );
458 
459  wait wait_time;
460 
461  self ‪heli_comlink_lights_on( localclientnum );
462 }
463 
464 function ‪heli_comlink_lights_on( localClientNum )
465 {
466  if( !isdefined( self.light_fx_handles_heli_comlink ) )
467  {
468  self.light_fx_handles_heli_comlink = [];
469  }
470 
471  self.light_fx_handles_heli_comlink[ 0 ] = PlayFXOnTag( localClientNum, level._effect["heli_comlink_light"]["common"], self, "tag_fx_light_left" );
472  self.light_fx_handles_heli_comlink[ 1 ] = PlayFXOnTag( localClientNum, level._effect["heli_comlink_light"]["common"], self, "tag_fx_light_right" );
473  self.light_fx_handles_heli_comlink[ 2 ] = PlayFXOnTag( localClientNum, level._effect["heli_comlink_light"]["common"], self, "tag_fx_tail" );
474  self.light_fx_handles_heli_comlink[ 3 ] = PlayFXOnTag( localClientNum, level._effect["heli_comlink_light"]["common"], self, "tag_fx_scanner" );
475 
476  if( isdefined( self.team ) )
477  {
478  for ( i = 0; i < self.light_fx_handles_heli_comlink.size; i++ )
479  SetFXTeam( localClientNum, self.light_fx_handles_heli_comlink[ i ], self.owner.team );
480  }
481 }
482 
483 function ‪heli_comlink_lights_off( localClientNum )
484 {
485  self notify( "heli_comlink_lights_off" );
486 
487  if ( isdefined( self.light_fx_handles_heli_comlink ) )
488  {
489  for( i = 0; i < self.light_fx_handles_heli_comlink.size; i++ )
490  {
491  if ( isdefined( self.light_fx_handles_heli_comlink[ i ] ) )
492  {
493  DeleteFX( localClientNum, self.light_fx_handles_heli_comlink[ i ] );
494  }
495  }
496 
497  self.light_fx_handles_heli_comlink = undefined;
498  }
499 }
500 
501 function ‪UpdateMarkerThread( localClientNum )
502 {
503  self endon( "entityshutdown" );
504 
505  player = self;
506 
507  killstreakCoreBundle = ‪struct::get_script_bundle( "killstreak", "killstreak_core" );
508 
509  while( isdefined( player.markerObj ) )
510  {
511  viewAngles = GetLocalClientAngles( localClientNum );
512 
513  forwardVector = VectorScale( AnglesToForward( viewAngles ), killstreakCoreBundle.ksMaxAirdropTargetRange );
514  results = BulletTrace( player GetEye(), player GetEye() + forwardVector, false, player );
515 
516  player.markerObj.origin = results["position"];
517 
518  wait( ‪CLIENT_FRAME );
519  }
520 }
521 
522 function ‪StopCrateEffects( localClientNum )
523 {
524  crate = self;
525 
526  if( isdefined( crate.thrusterFxHandle0 ) )
527  StopFX( localClientNum, crate.thrusterFxHandle0 );
528  if( isdefined( crate.thrusterFxHandle1 ) )
529  StopFX( localClientNum, crate.thrusterFxHandle1 );
530  if( isdefined( crate.thrusterFxHandle2 ) )
531  StopFX( localClientNum, crate.thrusterFxHandle2 );
532  if( isdefined( crate.thrusterFxHandle3 ) )
533  StopFX( localClientNum, crate.thrusterFxHandle3 );
534 
535  crate.thrusterFxHandle0 = undefined;
536  crate.thrusterFxHandle1 = undefined;
537  crate.thrusterFxHandle2 = undefined;
538  crate.thrusterFxHandle3 = undefined;
539 }
540 
541 function ‪CleanupThrustersThread( localClientNum )
542 {
543  crate = self;
544 
545  crate notify( "CleanupThrustersThread_singleton" );
546  crate endon( "CleanupThrustersThread_singleton" );
547 
548  crate waittill( "entityshutdown" );
549 
550  crate ‪StopCrateEffects( localClientNum );
551 }
552 
553 function ‪setSupplydropThrustersState( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
554 {
555  crate = self;
556  params = ‪struct::get_script_bundle( "killstreak", "killstreak_supply_drop" );
557 
558  if( ( newVal != oldVal ) && isdefined( params.ksThrusterFX ) )
559  {
560  if( newVal == 1 )
561  {
562  crate ‪StopCrateEffects( localClientNum );
563 
564  crate.thrusterFxHandle0 = PlayFXOnTag( localClientNum, params.ksThrusterFX, crate, "tag_thruster_fx_01" );
565  crate.thrusterFxHandle1 = PlayFXOnTag( localClientNum, params.ksThrusterFX, crate, "tag_thruster_fx_02" );
566  crate.thrusterFxHandle2 = PlayFXOnTag( localClientNum, params.ksThrusterFX, crate, "tag_thruster_fx_03" );
567  crate.thrusterFxHandle3 = PlayFXOnTag( localClientNum, params.ksThrusterFX, crate, "tag_thruster_fx_04" );
568 
569  crate thread ‪CleanupThrustersThread( localClientNum );
570  }
571  else
572  {
573  crate ‪StopCrateEffects( localClientNum );
574  }
575  }
576 }
577 
578 function ‪mothership_cb( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
579 {
580 }
581 
582 function ‪setAITankhrustersState( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
583 {
584  crate = self;
585  params = ‪struct::get_script_bundle( "killstreak", "killstreak_ai_tank_drop" );
586 
587  if( ( newVal != oldVal ) && isdefined( params.ksThrusterFX ) )
588  {
589  if( newVal == 1 )
590  {
591  crate ‪StopCrateEffects( localClientNum );
592 
593  crate.thrusterFxHandle0 = PlayFXOnTag( localClientNum, params.ksThrusterFX, crate, "tag_thruster_fx_01" );
594  crate.thrusterFxHandle1 = PlayFXOnTag( localClientNum, params.ksThrusterFX, crate, "tag_thruster_fx_02" );
595  crate.thrusterFxHandle2 = PlayFXOnTag( localClientNum, params.ksThrusterFX, crate, "tag_thruster_fx_03" );
596  crate.thrusterFxHandle3 = PlayFXOnTag( localClientNum, params.ksThrusterFX, crate, "tag_thruster_fx_04" );
597 
598  crate thread ‪CleanupThrustersThread( localClientNum );
599  }
600  else
601  {
602  crate ‪StopCrateEffects( localClientNum );
603  }
604  }
605 }
606 
607 function ‪marker_state_changed( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
608 {
609  self endon( "entityshutdown" );
610 
611  player = self;
612 
613  killstreakCoreBundle = ‪struct::get_script_bundle( "killstreak", "killstreak_core" );
614 
615  // Pick the new effect
616  if( newVal == 1 )
617  {
618  player.markerFX = killstreakCoreBundle.fxValidLocation;
619  }
620  else if ( newVal == 2 )
621  {
622  player.markerFX = killstreakCoreBundle.fxInvalidLocation;
623  }
624  else
625  {
626  player.markerFX = undefined;
627  }
628 
629  // Another thread is waiting for dobj creation
630  if ( isdefined( player.markerObj ) && !( player.markerObj hasdobj( localClientNum ) ) )
631  {
632  return;
633  }
634 
635  // Remove the old effect
636  if( isdefined( player.markerFXHandle ) )
637  {
638  KillFX( localClientNum, player.markerFXHandle ) ;
639  player.markerFXHandle = undefined;
640  }
641 
642  if ( isdefined( player.markerFX ) )
643  {
644  if( !isdefined( player.markerObj ) )
645  {
646  player.markerObj = ‪Spawn( localClientNum, ( 0, 0, 0 ), "script_model" );
647  player.markerObj.angles = ( 270, 0, 0 );
648 
649  player.markerObj SetModel( "wpn_t7_none_world" ); // No-model model to create dobj
650 
651  player.markerObj ‪util::waittill_dobj( localClientNum );
652 
653  player thread ‪UpdateMarkerThread( localClientNum );
654  }
655 
656  player.markerFXHandle = PlayFXOnTag( localClientNum, player.markerFX, player.markerObj, "tag_origin" );
657  }
658  else if( isdefined( player.markerObj ) )
659  {
660  player.markerObj Delete();
661  }
662 }
‪HELICOPTER_CAMO_STATE_FLICKER
‪#define HELICOPTER_CAMO_STATE_FLICKER
Definition: _killstreaks.gsh:222
‪marker_state_changed
‪function marker_state_changed(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _helicopter.csc:607
‪setSupplydropThrustersState
‪function setSupplydropThrustersState(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _helicopter.csc:553
‪set_dr_filter_framebuffer_duplicate
‪function set_dr_filter_framebuffer_duplicate(name, priority, require_flags, refuse_flags, drtype1, drval1, drcull1, drtype2, drval2, drcull2, drtype3, drval3, drcull3)
Definition: duplicaterender_mgr.csc:172
‪on_player_spawned
‪function on_player_spawned(localClientNum)
Definition: _helicopter.csc:98
‪play_locked_sound
‪function play_locked_sound(play)
Definition: _helicopter_sounds.csc:823
‪warnMissileLocked
‪function warnMissileLocked(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _helicopter.csc:248
‪UpdateMarkerThread
‪function UpdateMarkerThread(localClientNum)
Definition: _helicopter.csc:501
‪play_fired_sound
‪function play_fired_sound(play)
Definition: _helicopter_sounds.csc:828
‪startfx
‪function startfx(localClientNum)
Definition: _helicopter.csc:304
‪ACTIVE_CAMO_NORMAL
‪#define ACTIVE_CAMO_NORMAL
Definition: _helicopter.csc:37
‪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
‪friend_not_foe
‪function friend_not_foe(localClientIndex, predicted)
Definition: util_shared.csc:1164
‪DR_CULL_ALWAYS
‪#define DR_CULL_ALWAYS
Definition: duplicaterender.gsh:14
‪update_dr_filters
‪function update_dr_filters(localClientNum)
Definition: duplicaterender_mgr.csc:329
‪heli_deletefx
‪function heli_deletefx(localClientNum)
Definition: _helicopter.csc:264
‪mothership_cb
‪function mothership_cb(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _helicopter.csc:578
‪HELICOPTER_CAMO_STATE_OFF
‪#define HELICOPTER_CAMO_STATE_OFF
Definition: _killstreaks.gsh:220
‪heli_comlink_bootup_anim
‪function heli_comlink_bootup_anim(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _helicopter.csc:200
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪active_camo_changed
‪function active_camo_changed(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _helicopter.csc:120
‪supplydrop_ai_tank_state
‪function supplydrop_ai_tank_state(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _helicopter.csc:224
‪supplydrop_care_package_state
‪function supplydrop_care_package_state(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _helicopter.csc:209
‪CLIENT_FRAME
‪#define CLIENT_FRAME
Definition: shared.gsh:263
‪trail_fx
‪function trail_fx(localClientNum, trail_fx, trail_tag)
Definition: _helicopter.csc:447
‪heli_comlink_lights_on
‪function heli_comlink_lights_on(localClientNum)
Definition: _helicopter.csc:464
‪on_spawned
‪function on_spawned(func, obj)
Definition: callbacks_shared.csc:245
‪warnMissileLocking
‪function warnMissileLocking(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _helicopter.csc:240
‪CF_HOST_ONLY
‪#define CF_HOST_ONLY
Definition: version.gsh:102
‪damage_fx_stages
‪function damage_fx_stages(localClientNum)
Definition: _helicopter.csc:409
‪__init__
‪function __init__()
Definition: _helicopter.csc:46
‪SetupAnimTree
‪function SetupAnimTree()
Definition: _helicopter.csc:114
‪REGISTER_SYSTEM
‪#define REGISTER_SYSTEM(__sys, __func_init_preload, __reqs)
Definition: shared.gsh:204
‪Spawn
‪function Spawn(parent, onDeathCallback)
Definition: _flak_drone.gsc:427
‪DR_TYPE_FRAMEBUFFER
‪#define DR_TYPE_FRAMEBUFFER
Definition: duplicaterender.gsh:4
‪CAMO_TURNOFF_MODEL_RENDER
‪#define CAMO_TURNOFF_MODEL_RENDER
Definition: _helicopter.csc:42
‪aircraft_dustkick
‪function aircraft_dustkick(localClientNum)
Definition: _helicopter_sounds.csc:679
‪ACTIVE_CAMO_REVEAL
‪#define ACTIVE_CAMO_REVEAL
Definition: _helicopter.csc:39
‪warnMissileFired
‪function warnMissileFired(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _helicopter.csc:256
‪ACTIVE_CAMO_FLICKER
‪#define ACTIVE_CAMO_FLICKER
Definition: _helicopter.csc:38
‪startfx_loop
‪function startfx_loop(localClientNum)
Definition: _helicopter.csc:385
‪CleanupThrustersThread
‪function CleanupThrustersThread(localClientNum)
Definition: _helicopter.csc:541
‪waittill_dobj
‪function waittill_dobj(localClientNum)
Definition: util_shared.csc:1117
‪update_dr_flag
‪function update_dr_flag(localClientNum, toset, setto=true)
Definition: duplicaterender_mgr.csc:221
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪get_script_bundle
‪function get_script_bundle(str_type, str_name)
Definition: struct.csc:45
‪StopCrateEffects
‪function StopCrateEffects(localClientNum)
Definition: _helicopter.csc:522
‪heli_comlink_lights_on_after_wait
‪function heli_comlink_lights_on_after_wait(localClientNum, wait_time)
Definition: _helicopter.csc:454
‪set_dr_flag
‪function set_dr_flag(toset, setto=true)
Definition: duplicaterender_mgr.csc:251
‪setAITankhrustersState
‪function setAITankhrustersState(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _helicopter.csc:582
‪change_dr_flags
‪function change_dr_flags(localClientNum, toset, toclear)
Definition: duplicaterender_mgr.csc:289
‪play_targeted_sound
‪function play_targeted_sound(play)
Definition: _helicopter_sounds.csc:818
‪heli_comlink_lights_off
‪function heli_comlink_lights_off(localClientNum)
Definition: _helicopter.csc:483
‪set_dr_filter_framebuffer
‪function set_dr_filter_framebuffer(name, priority, require_flags, refuse_flags, drtype1, drval1, drcull1, drtype2, drval2, drcull2, drtype3, drval3, drcull3)
Definition: duplicaterender_mgr.csc:167
‪HELI_COMLINK_LIGHTS_ON_DELAY
‪#define HELI_COMLINK_LIGHTS_ON_DELAY
Definition: _killstreaks.gsh:324
‪doReveal
‪function doReveal(local_client_num, direction)
Definition: _helicopter.csc:145
‪CAMO_REVEAL_TIME
‪#define CAMO_REVEAL_TIME
Definition: _helicopter.csc:41
‪DR_TYPE_FRAMEBUFFER_DUPLICATE
‪#define DR_TYPE_FRAMEBUFFER_DUPLICATE
Definition: duplicaterender.gsh:5
‪serverTime
‪function serverTime()
Definition: util_shared.csc:1540