‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
_trophy_system.csc
Go to the documentation of this file.
1 #using scripts\codescripts\struct;
2 
3 #using scripts\shared\callbacks_shared;
4 #using scripts\shared\clientfield_shared;
5 #using scripts\shared\system_shared;
6 #using scripts\shared\util_shared;
7 #using scripts\shared\weapons\_weaponobjects;
8 
9 #insert scripts\shared\shared.gsh;
10 #insert scripts\shared\version.gsh;
11 
12 
13 #precache( "client_fx", "weapon/fx_trophy_light_enemy" );
14 
15 #using_animtree ( "mp_trophy_system" );
16 
17 #namespace trophy_system;
18 
19 function ‪init_shared( localClientNum )
20 {
23 }
24 
25 
26 //******************************************************************
27 // *
28 // *
29 //******************************************************************
30 function ‪trophy_state_change( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
31 {
32  self endon("entityshutdown");
33 
34  self ‪util::waittill_dobj( localClientNum );
35 
36  if ( !isdefined(self) )
37  return;
38 
39  switch( newVal )
40  {
42  {
43  self thread ‪trophy_rolling_anim( localClientNum );
44  break;
45  }
47  {
48  self thread ‪trophy_stationary_anim( localClientNum );
49  break;
50  }
52  {
53  break;
54  }
56  {
57  break;
58  }
59  }
60 }
61 
62 
63 //******************************************************************
64 // *
65 // *
66 //******************************************************************
67 function ‪trophy_state_change_recon( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
68 {
69  self endon("entityshutdown");
70 
71  self ‪util::waittill_dobj( localClientNum );
72 
73  if ( !isdefined(self) )
74  return;
75 
76  switch( newVal )
77  {
79  {
80  self thread ‪trophy_rolling_anim( localClientNum );
81  break;
82  }
84  {
85  self thread ‪trophy_stationary_anim( localClientNum );
86  break;
87  }
89  {
90  break;
91  }
93  {
94  break;
95  }
96  }
97 }
98 
99 //******************************************************************
100 // *
101 // *
102 //******************************************************************
103 function ‪trophy_rolling_anim( localClientNum )
104 {
105  self endon("entityshutdown");
106 
107  self UseAnimTree( #animtree );
108  self SetAnim( %o_trophy_deploy, 1.0 );
109 }
110 
111 //******************************************************************
112 // *
113 // *
114 //******************************************************************
115 function ‪trophy_stationary_anim( localClientNum )
116 {
117  self endon("entityshutdown");
118 
119  self UseAnimTree( #animtree );
120  self SetAnim( %o_trophy_deploy, 0.0 );
121  self SetAnim( %o_trophy_spin, 1.0 );
122 }
‪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
‪init_shared
‪function init_shared(localClientNum)
Definition: _trophy_system.csc:19
‪trophy_state_change
‪function trophy_state_change(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _trophy_system.csc:30
‪TROPHY_SYSTEM_STUNNED
‪#define TROPHY_SYSTEM_STUNNED
Definition: shared.gsh:323
‪TROPHY_SYSTEM_ROLLING
‪#define TROPHY_SYSTEM_ROLLING
Definition: shared.gsh:321
‪trophy_state_change_recon
‪function trophy_state_change_recon(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
Definition: _trophy_system.csc:67
‪CF_HOST_ONLY
‪#define CF_HOST_ONLY
Definition: version.gsh:102
‪trophy_rolling_anim
‪function trophy_rolling_anim(localClientNum)
Definition: _trophy_system.csc:103
‪trophy_stationary_anim
‪function trophy_stationary_anim(localClientNum)
Definition: _trophy_system.csc:115
‪TROPHY_SYSTEM_STATIONARY
‪#define TROPHY_SYSTEM_STATIONARY
Definition: shared.gsh:322
‪waittill_dobj
‪function waittill_dobj(localClientNum)
Definition: util_shared.csc:1117
‪register
‪function register()
Definition: _ai_tank.gsc:126
‪TROPHY_SYSTEM_INIT
‪#define TROPHY_SYSTEM_INIT
Definition: shared.gsh:320