‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
animation_shared.gsc
Go to the documentation of this file.
1 #using scripts\shared\ai_shared;
2 #using scripts\shared\animation_debug_shared;
3 #using scripts\shared\clientfield_shared;
4 #using scripts\shared\flag_shared;
5 #using scripts\shared\flagsys_shared;
6 #using scripts\shared\math_shared;
7 #using scripts\shared\string_shared;
8 #using scripts\shared\system_shared;
9 #using scripts\shared\util_shared;
10 
11 #insert scripts\shared\shared.gsh;
12 #insert scripts\shared\version.gsh;
13 #insert scripts\shared\archetype_shared\archetype_shared.gsh;
14 #insert scripts\shared\ai\systems\animation_state_machine.gsh;
15 
16 #namespace animation;
17 
18 ‪REGISTER_SYSTEM( "animation", &‪__init__, undefined )
19 
20 function ‪__init__()
21 {
23 }
24 
36 function ‪first_frame( animation, v_origin_or_ent, v_angles_or_tag )
37 {
38  self thread ‪play( animation, v_origin_or_ent, v_angles_or_tag, 0 );
39 }
40 
52 function ‪last_frame( animation, v_origin_or_ent, v_angles_or_tag )
53 {
54  self thread ‪play( animation, v_origin_or_ent, v_angles_or_tag, 0, 0, 0, 0, 1 );
55 }
56 
76 function ‪play( animation, v_origin_or_ent, v_angles_or_tag, n_rate = 1, n_blend_in = .2, n_blend_out = .2, n_lerp = 0, n_start_time = 0, b_show_player_firstperson_weapon = false, b_unlink_after_completed = true )
77 {
78  if ( SessionModeIsZombiesGame() && self IsRagdoll() )
79  {
80  return;
81  }
82 
83  self endon( "death" );
84  self thread ‪_play( animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp, n_start_time, b_show_player_firstperson_weapon, b_unlink_after_completed );
85  self waittill( "scriptedanim" );
86 }
87 
97 function ‪stop( n_blend = 0.2 )
98 {
99  ‪flagsys::clear( "scriptedanim" );
100  self StopAnimScripted( n_blend );
101 }
102 
103 function ‪_play( animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp, n_start_time, b_show_player_firstperson_weapon, b_unlink_after_completed )
104 {
105  self endon( "death" );
106 
107  self notify( "new_scripted_anim" );
108  self endon( "new_scripted_anim" );
109 
110  ‪flagsys::set_val( "firstframe", n_rate == 0 );
111  ‪flagsys::set( "scripted_anim_this_frame" );
112  ‪flagsys::set( "scriptedanim" );
113 
114  ‪DEFAULT( v_origin_or_ent, self );
115 
116  b_link = false;
117 
118  // Check to see if the entity has an anim rate override set
119  if ( isdefined( self.n_script_anim_rate ) )
120  {
121  n_rate = self.n_script_anim_rate;
122  }
123 
124  if ( IsVec( v_origin_or_ent ) && IsVec( v_angles_or_tag ) )
125  {
126  self AnimScripted( animation, v_origin_or_ent, v_angles_or_tag, animation, "normal", undefined, n_rate, n_blend_in, n_lerp, n_start_time, true, b_show_player_firstperson_weapon );
127  }
128  else
129  {
130  if ( IsString( v_angles_or_tag ) )
131  {
132  Assert( isdefined( v_origin_or_ent.model ), "Cannot align animation '" + animation + "' to tag '" + v_angles_or_tag + "' because the animation is not aligned to a model." );
133 
134  // LinkTo was not working correctly with animation and always positioning the object as if it was linked to the tag_origin
135  // Moving the object to the tag position fixes this.
136  //self teleport( animation, v_origin_or_ent, v_angles_or_tag );
137 
138  v_pos = v_origin_or_ent GetTagOrigin( v_angles_or_tag );
139  v_ang = v_origin_or_ent GetTagAngles( v_angles_or_tag );
140 
141  if ( n_lerp > 0 )
142  {
143  prevOrigin = self.origin;
144  prevAngles = self.angles;
145  }
146 
147  if ( !isdefined(v_pos) )
148  {
149  v_pos = v_origin_or_ent.origin;
150  v_ang = v_origin_or_ent.angles;
151  }
152 
153  if ( IsActor( self ) )
154  {
155  self ForceTeleport( v_pos, v_ang );
156  }
157  else
158  {
159  self.origin = v_pos;
160  self.angles = v_ang;
161  }
162 
163 
164  b_link = true;
165 
166  self LinkTo( v_origin_or_ent, v_angles_or_tag, ( 0, 0, 0 ), ( 0, 0, 0 ) );
167 
168  if ( n_lerp > 0 )
169  {
170  if ( IsActor( self ) )
171  {
172  self ForceTeleport( prevOrigin, prevAngles );
173  }
174  else
175  {
176  self.origin = prevOrigin;
177  self.angles = prevAngles;
178  }
179  }
180 
181  self AnimScripted( animation, v_pos, v_ang, animation, "normal", undefined, n_rate, n_blend_in, n_lerp, n_start_time, true, b_show_player_firstperson_weapon );
182  }
183  else
184  {
185  v_angles = ( isdefined( v_origin_or_ent.angles ) ? v_origin_or_ent.angles : ( 0, 0, 0 ) );
186  self AnimScripted( animation, v_origin_or_ent.origin, v_angles, animation, "normal", undefined, n_rate, n_blend_in, n_lerp, n_start_time, true, b_show_player_firstperson_weapon );
187  }
188  }
189 
190  if ( IsPlayer( self ) )
191  {
193  }
194 
195  if ( !IsAnimLooping( animation ) && ( n_blend_out > 0 ) && ( n_rate > 0 ) && ( n_start_time < 1 ) )
196  {
197  if( !AnimHasNotetrack( animation, ‪NOTETRACK_RAGDOLL ) )
198  {
199  self thread ‪_blend_out( animation, n_blend_out, n_rate, n_start_time );
200  }
201  }
202 
203  self thread ‪handle_notetracks( animation );
204 
205  if ( GetAnimFrameCount( animation ) > 1 || IsAnimLooping( animation ) )
206  {
207  self waittillmatch( animation, "end" );
208  }
209  else
210  {
212  }
213 
214  if ( b_link && ‪IS_TRUE(b_unlink_after_completed) )
215  {
216  self Unlink();
217  }
218 
219  ‪flagsys::clear( "scriptedanim" );
220  ‪flagsys::clear( "firstframe" );
221 
222  waittillframeend;
223 
224  ‪flagsys::clear( "scripted_anim_this_frame" );
225 }
226 
227 function ‪_blend_out( animation, n_blend, n_rate, n_start_time )
228 {
229  self endon( "death" );
230  self endon( "end" );
231  self endon( "scriptedanim" );
232  self endon( "new_scripted_anim" );
233 
234  n_server_length = Floor( GetAnimLength( animation ) / .05 ) * .05; // clamp to full server frames.
235 
236  while ( true )
237  {
238  n_current_time = self GetAnimTime( animation ) * n_server_length;
239  n_time_left = n_server_length - n_current_time;
240 
241  if ( n_time_left <= n_blend )
242  {
243  self StopAnimScripted( n_blend );
244  break;
245  }
246 
248  }
249 }
250 
251 function ‪_get_align_ent( e_align )
252 {
253  e = self;
254  if ( isdefined( e_align ) )
255  {
256  e = e_align;
257  }
258 
259  ‪DEFAULT( e.angles, ( 0, 0, 0 ) );
260  return e;
261 }
262 
263 function ‪_get_align_pos( v_origin_or_ent, v_angles_or_tag )
264 {
265  ‪DEFAULT( v_origin_or_ent, self.origin );
266  ‪DEFAULT2( v_angles_or_tag, self.angles, ( 0, 0, 0 ) );
267 
268  s = SpawnStruct();
269 
270  if ( IsVec( v_origin_or_ent ) )
271  {
272  Assert( IsVec( v_angles_or_tag ), "Angles must be a vector if origin is." );
273 
274  s.origin = v_origin_or_ent;
275  s.angles = v_angles_or_tag;
276  }
277  else
278  {
279  e_align = ‪_get_align_ent( v_origin_or_ent );
280 
281  if ( IsString( v_angles_or_tag ) )
282  {
283  s.origin = e_align GetTagOrigin( v_angles_or_tag );
284  s.angles = e_align GetTagAngles( v_angles_or_tag );
285  }
286  else
287  {
288  s.origin = e_align.origin;
289  s.angles = e_align.angles;
290  }
291  }
292 
293  ‪DEFAULT( s.angles, ( 0, 0, 0 ) );
294 
295  return s;
296 }
297 
311 function ‪teleport( animation, v_origin_or_ent, v_angles_or_tag, time )
312 {
313  if ( !IsDefined( time ) )
314  {
315  time = 0.0;
316  }
317 
318  s = ‪_get_align_pos( v_origin_or_ent, v_angles_or_tag );
319  v_pos = GetStartOrigin( s.origin, s.angles, animation, time );
320  v_ang = GetStartAngles( s.origin, s.angles, animation, time );
321 
322  if ( IsActor( self ) )
323  {
324  self ForceTeleport( v_pos, v_ang );
325  }
326  else
327  {
328  self.origin = v_pos;
329  self.angles = v_ang;
330  }
331 }
332 
333 #define MIN_REACH_DIST_SQ 4 * 4
334 
335 function ‪reach( animation, v_origin_or_ent, v_angles_or_tag, b_disable_arrivals = false )
336 {
337  self endon( "death" );
338  s_tracker = SpawnStruct();
339  self thread ‪_reach( s_tracker, animation, v_origin_or_ent, v_angles_or_tag, b_disable_arrivals );
340  s_tracker waittill( "done" );
341 }
342 
343 function ‪_reach( s_tracker, animation, v_origin_or_ent, v_angles_or_tag, b_disable_arrivals = false )
344 {
345  self endon( "death" );
346 
347  self notify( "stop_going_to_node" );
348  self notify( "new_anim_reach" );
349 
350  ‪flagsys::wait_till_clear( "anim_reach" ); // let any previous force goal thread cleanup first
351  ‪flagsys::set( "anim_reach" );
352 
353  s = ‪_get_align_pos( v_origin_or_ent, v_angles_or_tag );
354  goal = GetStartOrigin( s.origin, s.angles, animation );
355 
356  n_delta = DistanceSquared( goal, self.origin );
357  if ( n_delta > ‪MIN_REACH_DIST_SQ )
358  {
359  self StopAnimScripted( .2 ); // Allways stop current animation to do a new reach
360 
361  if ( b_disable_arrivals )
362  {
363  if ( ‪ai::has_behavior_attribute( "disablearrivals" ) )
364  {
365  ‪ai::set_behavior_attribute( "disablearrivals", true );
366  }
367 
368  // SUMEET TODO - investigate deceleration
369  self.stopanimdistsq = 0.0001; // turns off deceleration
370  }
371 
372  // Rogue controlled robots don't respect force_goal, handle through the rogue_control_force_goal attribute.
373  if ( ‪IS_ROBOT( self ) )
374  {
375  ‪ai::set_behavior_attribute( "rogue_control_force_goal", goal );
376  }
377  else if ( ‪ai::has_behavior_attribute( "vignette_mode" ) && !‪IS_TRUE( self.ignoreVignetteModeForAnimReach ) )
378  {
379  ‪ai::set_behavior_attribute( "vignette_mode", "fast" );
380  }
381 
382  self thread ‪ai::force_goal( goal, 15, true, undefined, false, true );
383 
384  self ‪util::waittill_any( "goal", "new_anim_reach", "new_scripted_anim", "stop_scripted_anim" );
385 
386  if ( ‪ai::has_behavior_attribute( "disablearrivals" ) )
387  {
388  ‪ai::set_behavior_attribute( "disablearrivals", false );
389  self.stopanimdistsq = 0; // reset to zero (turns on deceleration)
390  }
391  }
392  else
393  {
394  waittillframeend; // if we skip the reach, we need to wait here to let other script wait for notifies
395  }
396 
397  if ( !‪IS_ROBOT( self ) && ‪ai::has_behavior_attribute( "vignette_mode" ) )
398  {
399  ‪ai::set_behavior_attribute( "vignette_mode", "off" );
400  }
401 
402  ‪flagsys::clear( "anim_reach" );
403  s_tracker notify( "done" );
404  self notify( "reach_done" );
405 }
406 
423 function ‪set_death_anim( animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp )
424 {
425  self notify( "new_death_anim" );
426  if ( isdefined( animation ) )
427  {
428  self.skipdeath = true;
429  self thread ‪_do_death_anim( animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp );
430  }
431  else
432  {
433  self.skipdeath = false;
434  }
435 }
436 
437 function ‪_do_death_anim( animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp )
438 {
439  self endon( "new_death_anim" );
440 
441  self waittill( "death" );
442 
443  if ( isdefined( self ) && !self IsRagdoll() )
444  {
445  self ‪play( animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp );
446  }
447 }
448 
450 {
451  if ( ‪IS_TRUE( self.player_anim_look_enabled ) )
452  {
453  self SetViewClamp( self.player_anim_clamp_right, self.player_anim_clamp_left, self.player_anim_clamp_top, self.player_anim_clamp_bottom );
454  }
455 }
456 
458 // Notetrack Handling
460 #define CF_CRACKS_RED 1
461 #define CF_CRACKS_BLUE 2
462 #define CF_CRACKS_GREEN 3
463 #define CF_CRACKS_ALL 4
464 
465 function ‪add_notetrack_func( funcname, func )
466 {
467  ‪DEFAULT( level._animnotifyfuncs, [] );
468 
469  Assert( !isdefined( level._animnotifyfuncs[ funcname ] ), "Notetrack function already exists." );
470 
471  level._animnotifyfuncs[ funcname ] = func;
472 }
473 
474 function ‪add_global_notetrack_handler( str_note, func, pass_notify_params, ... )
475 {
476  ‪DEFAULT( level._animnotetrackhandlers, [] );
477  ‪DEFAULT( level._animnotetrackhandlers[ str_note ], [] );
478 
479  ‪ARRAY_ADD( level._animnotetrackhandlers[ str_note ], ‪array( func, pass_notify_params, vararg ) );
480 }
481 
482 function ‪call_notetrack_handler( str_note, param1, param2 )
483 {
484  if ( isdefined( level._animnotetrackhandlers[ str_note ] ) )
485  {
486  foreach ( handler in level._animnotetrackhandlers[ str_note ] )
487  {
488  func = handler[0];
489  passNotifyParams = handler[1];
490  args = handler[2];
491 
492  if( passNotifyParams )
493  {
494  self [[ func ]]( param1, param2 );
495  }
496  else
497  {
498  switch ( args.size )
499  {
500  case 6:
501  self [[ func ]]( args[0], args[1], args[2], args[3], args[4], args[5] );
502  break;
503  case 5:
504  self [[ func ]]( args[0], args[1], args[2], args[3], args[4] );
505  break;
506  case 4:
507  self [[ func ]]( args[0], args[1], args[2], args[3] );
508  break;
509  case 3:
510  self [[ func ]]( args[0], args[1], args[2] );
511  break;
512  case 2:
513  self [[ func ]]( args[0], args[1] );
514  break;
515  case 1:
516  self [[ func ]]( args[0] );
517  break;
518  case 0:
519  self [[ func ]]();
520  break;
521  default: AssertMsg( "Too many args passed to notetrack handler." );
522  }
523  }
524  }
525  }
526 }
527 
529 {
530  ‪add_notetrack_func( "flag::set", &‪flag::set );
531  ‪add_notetrack_func( "flag::clear", &‪flag::clear );
532  ‪add_notetrack_func( "util::break_glass", &‪util::break_glass );
533 
534  ‪clientfield::register( "scriptmover", "cracks_on", ‪VERSION_SHIP, GetMinBitCountForNum( 4 ), "int" );
535  ‪clientfield::register( "scriptmover", "cracks_off", ‪VERSION_SHIP, GetMinBitCountForNum( 4 ), "int" );
536 
537  ‪add_global_notetrack_handler( "red_cracks_on", &‪cracks_on, false, "red" );
538  ‪add_global_notetrack_handler( "green_cracks_on", &‪cracks_on, false, "green" );
539  ‪add_global_notetrack_handler( "blue_cracks_on", &‪cracks_on, false, "blue" );
540  ‪add_global_notetrack_handler( "all_cracks_on", &‪cracks_on, false, "all" );
541 
542  ‪add_global_notetrack_handler( "red_cracks_off", &‪cracks_off, false, "red" );
543  ‪add_global_notetrack_handler( "green_cracks_off", &‪cracks_off, false, "green" );
544  ‪add_global_notetrack_handler( "blue_cracks_off", &‪cracks_off, false, "blue" );
545  ‪add_global_notetrack_handler( "all_cracks_off", &‪cracks_off, false, "all" );
546 
547  ‪add_global_notetrack_handler( "headlook_on", &‪enable_headlook, false, true );
548  ‪add_global_notetrack_handler( "headlook_off", &‪enable_headlook, false, false );
549 
550  ‪add_global_notetrack_handler( "headlook_notorso_on", &‪enable_headlook_notorso, false, true );
551  ‪add_global_notetrack_handler( "headlook_notorso_off", &‪enable_headlook_notorso, false, false );
552 
553  ‪add_global_notetrack_handler( "attach weapon", &‪attach_weapon, true );
554  ‪add_global_notetrack_handler( "detach weapon", &‪detach_weapon, true );
556 }
557 
558 function ‪handle_notetracks( animation )
559 {
560  self endon( "death" );
561  self endon( "new_scripted_anim" );
562 
563  while ( true )
564  {
565  self waittill( animation, str_note, param1, param2 );
566 
567  if ( isdefined( str_note ) )
568  {
569  if ( str_note != "end" && str_note != "loop_end" )
570  {
571  self thread ‪call_notetrack_handler( str_note, param1, param2 );
572  }
573  else
574  {
575  return;
576  }
577  }
578  }
579 }
580 
581 function ‪cracks_on( str_type )
582 {
583  switch ( str_type )
584  {
585  case "red":
586  ‪clientfield::set( "cracks_on", ‪CF_CRACKS_RED );
587  break;
588  case "green":
589  ‪clientfield::set( "cracks_on", ‪CF_CRACKS_GREEN );
590  break;
591  case "blue":
592  ‪clientfield::set( "cracks_on", ‪CF_CRACKS_BLUE );
593  break;
594  case "all":
595  ‪clientfield::set( "cracks_on", ‪CF_CRACKS_ALL );
596  break;
597  }
598 }
599 
600 function ‪cracks_off( str_type )
601 {
602  switch ( str_type )
603  {
604  case "red":
605  ‪clientfield::set( "cracks_off", ‪CF_CRACKS_RED );
606  break;
607  case "green":
608  ‪clientfield::set( "cracks_off", ‪CF_CRACKS_GREEN );
609  break;
610  case "blue":
611  ‪clientfield::set( "cracks_off", ‪CF_CRACKS_BLUE );
612  break;
613  case "all":
614  ‪clientfield::set( "cracks_off", ‪CF_CRACKS_ALL );
615  break;
616  }
617 }
618 
619 function ‪enable_headlook( b_on = true )
620 {
621  if ( IsActor( self ) )
622  {
623  if ( b_on )
624  {
625  self ‪LookAtEntity( level.players[0] );
626  }
627  else
628  {
629  self ‪LookAtEntity();
630  }
631  }
632 }
633 
634 function ‪enable_headlook_notorso( b_on = true )
635 {
636  if ( IsActor( self ) )
637  {
638  if ( b_on )
639  {
640  self ‪LookAtEntity( level.players[0], 1 );
641  }
642  else
643  {
644  self ‪LookAtEntity();
645  }
646  }
647 }
648 
649 function ‪is_valid_weapon( weaponObject )
650 {
651  return ( isdefined( weaponObject ) && ( weaponObject != level.weaponNone ) );
652 }
653 
654 function ‪attach_weapon( weaponObject, tag = "tag_weapon_right" )
655 {
656  if ( IsActor( self ) )
657  {
658  if ( ‪is_valid_weapon( weaponObject ) )
659  {
660  // tag is un-used for actors, may be we can find a use for it in future
661  // we assume that he will always use the right hand while animating with a weapon
662  ‪ai::gun_switchto( weaponObject.name, "right" );
663  }
664  else
665  {
667  }
668  }
669  else
670  {
671  if ( !‪is_valid_weapon( weaponObject ) )
672  {
673  weaponObject = self.last_item;
674  }
675 
676  if ( ‪is_valid_weapon( weaponObject ) )
677  {
678  if ( self.item != level.weaponNone )
679  {
681  }
682 
683  assert( isdefined( weaponObject.worldModel ) );
684 
685  self Attach( weaponObject.worldModel, tag );
686  self SetEntityWeapon( weaponObject );
687 
688  self.gun_removed = undefined;
689  self.last_item = weaponObject;
690  }
691  }
692 }
693 
694 function ‪detach_weapon( weaponObject, tag = "tag_weapon_right" )
695 {
696  if ( IsActor( self ) )
697  {
698  // tag is un-used, may be we can find a use for it in future
700  }
701  else
702  {
703  if ( !‪is_valid_weapon( weaponObject ) )
704  {
705  weaponObject = self.item;
706  }
707 
708  if ( ‪is_valid_weapon( weaponObject ) )
709  {
710  self Detach( weaponObject.worldModel, tag );
711  self SetEntityWeapon( level.weaponNone );
712  }
713 
714  self.gun_removed = true;
715  }
716 }
717 
718 function ‪fire_weapon()
719 {
720  if( !IsAI( self ) )
721  {
722  if( self.item != level.weaponNone )
723  {
724  startPos = self GetTagOrigin( "tag_flash" );
725  endPos = startPos + VectorScale( AnglesToForward( self GetTagAngles( "tag_flash" ) ), 100 );
726 
727  // The reason we use .item here instead of .weapon is because, weapon is not part of the
728  // entity fields but rather entity specific fields such as actor fields and such.
729  MagicBullet( self.item, startPos, endPos, self );
730  }
731  }
732 }
733 
735 // !Notetrack Handling
‪CF_CRACKS_RED
‪#define CF_CRACKS_RED
Definition: animation_shared.gsc:460
‪force_goal
‪function force_goal(goto, n_radius, b_shoot=true, str_end_on, b_keep_colors=false, b_should_sprint=false)
Definition: ai_shared.gsc:570
‪enable_headlook_notorso
‪function enable_headlook_notorso(b_on=true)
Definition: animation_shared.gsc:634
‪gun_recall
‪function gun_recall()
Definition: ai_shared.gsc:141
‪CF_CRACKS_BLUE
‪#define CF_CRACKS_BLUE
Definition: animation_shared.gsc:461
‪CF_CRACKS_ALL
‪#define CF_CRACKS_ALL
Definition: animation_shared.gsc:463
‪clear
‪function clear(str_flag)
Definition: flag_shared.csc:130
‪VERSION_SHIP
‪#define VERSION_SHIP
Definition: version.gsh:36
‪teleport
‪function teleport(animation, v_origin_or_ent, v_angles_or_tag, time)
Definition: animation_shared.gsc:311
‪DEFAULT2
‪#define DEFAULT2(__var, __default1, __default2)
Definition: shared.gsh:271
‪first_frame
‪function first_frame(animation, v_origin_or_ent, v_angles_or_tag)
Definition: animation_shared.gsc:36
‪MIN_REACH_DIST_SQ
‪#define MIN_REACH_DIST_SQ
Definition: animation_shared.gsc:333
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪CF_CRACKS_GREEN
‪#define CF_CRACKS_GREEN
Definition: animation_shared.gsc:462
‪_blend_out
‪function _blend_out(animation, n_blend, n_rate, n_start_time)
Definition: animation_shared.gsc:227
‪is_valid_weapon
‪function is_valid_weapon(weaponObject)
Definition: animation_shared.gsc:649
‪add_global_notetrack_handler
‪function add_global_notetrack_handler(str_note, func, pass_notify_params,...)
Definition: animation_shared.gsc:474
‪has_behavior_attribute
‪function has_behavior_attribute(attribute)
Definition: ai_shared.gsc:198
‪set_death_anim
‪function set_death_anim(animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp)
Definition: animation_shared.gsc:423
‪break_glass
‪function break_glass(n_radius=50)
Definition: util_shared.gsc:319
‪DEFAULT
‪#define DEFAULT(__var, __default)
Definition: shared.gsh:270
‪attach_weapon
‪function attach_weapon(weaponObject, tag="tag_weapon_right")
Definition: animation_shared.gsc:654
‪_get_align_ent
‪function _get_align_ent(e_align)
Definition: animation_shared.gsc:251
‪_reach
‪function _reach(s_tracker, animation, v_origin_or_ent, v_angles_or_tag, b_disable_arrivals=false)
Definition: animation_shared.gsc:343
‪waittill_any
‪function waittill_any(str_notify1, str_notify2, str_notify3, str_notify4, str_notify5)
Definition: util_shared.csc:375
‪ARRAY_ADD
‪#define ARRAY_ADD(__array, __item)
Definition: shared.gsh:304
‪handle_notetracks
‪function handle_notetracks(animation)
Definition: animation_shared.gsc:558
‪gun_switchto
‪function gun_switchto(weapon, whichHand)
Definition: ai_shared.gsc:127
‪NOTETRACK_RAGDOLL
‪#define NOTETRACK_RAGDOLL
Definition: animation_state_machine.gsh:57
‪REGISTER_SYSTEM
‪#define REGISTER_SYSTEM(__sys, __func_init_preload, __reqs)
Definition: shared.gsh:204
‪array
‪function filter array
Definition: array_shared.csc:16
‪_get_align_pos
‪function _get_align_pos(v_origin_or_ent, v_angles_or_tag)
Definition: animation_shared.gsc:263
‪add_notetrack_func
‪function add_notetrack_func(funcname, func)
Definition: animation_shared.gsc:465
‪call_notetrack_handler
‪function call_notetrack_handler(str_note, param1, param2)
Definition: animation_shared.gsc:482
‪setup_notetracks
‪function setup_notetracks()
Definition: animation_shared.gsc:528
‪set_player_clamps
‪function set_player_clamps()
Definition: animation_shared.gsc:449
‪cracks_on
‪function cracks_on(str_type)
Definition: animation_shared.gsc:581
‪reach
‪function reach(animation, v_origin_or_ent, v_angles_or_tag, b_disable_arrivals=false)
Definition: animation_shared.gsc:335
‪stop
‪function stop(n_blend=0.2)
Definition: animation_shared.gsc:97
‪last_frame
‪function last_frame(animation, v_origin_or_ent, v_angles_or_tag)
Definition: animation_shared.gsc:52
‪_do_death_anim
‪function _do_death_anim(animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp)
Definition: animation_shared.gsc:437
‪set
‪function set(str_field_name, n_value)
Definition: clientfield_shared.gsc:34
‪set_val
‪function set_val(str_flag, b_val)
Definition: flag_shared.gsc:123
‪LookAtEntity
‪function LookAtEntity(lookTargetEntity, lookDuration, lookSpeed, eyesOnly, interruptOthers)
Definition: zombie_shared.gsc:24
‪set_behavior_attribute
‪function set_behavior_attribute(attribute, value)
Definition: ai_shared.gsc:159
‪cracks_off
‪function cracks_off(str_type)
Definition: animation_shared.gsc:600
‪detach_weapon
‪function detach_weapon(weaponObject, tag="tag_weapon_right")
Definition: animation_shared.gsc:694
‪_play
‪function _play(animation, v_origin_or_ent, v_angles_or_tag, n_rate, n_blend_in, n_blend_out, n_lerp, n_start_time, b_show_player_firstperson_weapon, b_unlink_after_completed)
Definition: animation_shared.gsc:103
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪enable_headlook
‪function enable_headlook(b_on=true)
Definition: animation_shared.gsc:619
‪__init__
‪function __init__()
Definition: animation_shared.gsc:20
‪wait_till_clear
‪function wait_till_clear(str_flag)
Definition: flag_shared.csc:248
‪gun_remove
‪function gun_remove()
Definition: ai_shared.gsc:110
‪play
‪function play(animation, v_origin_or_ent, v_angles_or_tag, n_rate=1, n_blend_in=.2, n_blend_out=.2, n_lerp=0, n_start_time=0, b_show_player_firstperson_weapon=false, b_unlink_after_completed=true)
Definition: animation_shared.gsc:76
‪fire_weapon
‪function fire_weapon()
Definition: animation_shared.gsc:718
‪IS_ROBOT
‪#define IS_ROBOT(__e)
Definition: archetype_shared.gsh:43
‪WAIT_SERVER_FRAME
‪#define WAIT_SERVER_FRAME
Definition: shared.gsh:265