]> icculus.org git repositories - divverent/nexuiz.git/blob - TeamNexuiz/game/gamec/defs.h
Added a Game C folder
[divverent/nexuiz.git] / TeamNexuiz / game / gamec / defs.h
1 \r
2 // Globals\r
3 \r
4 entity  activator;\r
5 string  string_null;\r
6 \r
7 //entity        casing;\r
8 entity dest;\r
9 \r
10 // Fields\r
11 \r
12 .void(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) event_damage;\r
13 \r
14 //.string       wad;\r
15 //.string       map;\r
16 \r
17 //.float        worldtype;\r
18 .float  delay;\r
19 .float  wait;\r
20 .float  lip;\r
21 //.float        light_lev;\r
22 .float  speed;\r
23 //.float        style;\r
24 //.float        skill;\r
25 \r
26 .string killtarget;\r
27 \r
28 .vector pos1, pos2;\r
29 .vector mangle;\r
30 \r
31 .float  jump_flag;                              // storing velocity_z for falling damage\r
32 .float  attack_finished;\r
33 .float  pain_finished;                  //Added by Supajoe\r
34 .float  pain_frame;                     //"\r
35 .float  statdraintime;                  // record the one-second intervals between draining health and armour when they're over 100\r
36 .float  crouch; // Crouching or not?\r
37 \r
38 .float  strength_finished;\r
39 //.float        speed_finished;\r
40 .float  invincible_finished;\r
41 //.float        slowmo_finished;\r
42 \r
43 .vector         finaldest, finalangle;          //plat.qc stuff\r
44 .void()         think1;\r
45 .float state;\r
46 .float          t_length, t_width;\r
47 \r
48 .vector dest1;\r
49 .vector dest2;\r
50 .vector destvec;                // for rain\r
51 .float cnt;             // for rain\r
52 .float count;\r
53 //.float cnt2;\r
54 \r
55 .float death_time;\r
56 .float dead_time;\r
57 .float dead_frame;\r
58 .float die_frame;\r
59 .float fade_time;\r
60 .float fade_rate;\r
61 \r
62 .string mdl;\r
63 \r
64 .string playermodel;\r
65 .string playerskin;\r
66 \r
67 .float  respawntime;\r
68 //.float        chasecam;\r
69 \r
70 .float electrocount;\r
71 //.float crylinkcount;\r
72 \r
73 .float  damageforcescale;\r
74 \r
75 //.float          gravity;\r
76 \r
77 .float          dmg;\r
78 \r
79 // for railgun damage (hitting multiple enemies)\r
80 .float railgunhit;\r
81 .float railgunhitsolidbackup;\r
82 .vector railgunhitloc;\r
83 \r
84 .float          air_finished;\r
85 .float          dmgtime;\r
86 \r
87 .float          killcount;\r
88 \r
89 // definistions for weaponsystem\r
90 \r
91 .entity weaponentity;\r
92 .entity exteriorweaponentity;\r
93 .float switchweapon;\r
94 void(float wpn, float wrequest) weapon_action;\r
95 float(entity cl, float wpn, float andammo) client_hasweapon;\r
96 void() w_clear;\r
97 // VorteX: standalone think for weapons, so normal think on weaponentity can be reserved by weaponflashes (which needs update even player dies)\r
98 .float weapon_nextthink;\r
99 .void() weapon_think;\r
100 .vector shotdir, shotorg; // new generic aiming system for all weapons (not finished yet, can be removed)\r
101 float   weapon_hasammo; // sets by WR_CHECKAMMO request\r
102 \r
103 //float PLAYER_WEAPONSELECTION_DELAY = );\r
104 float   PLAYER_WEAPONSELECTION_SPEED = 18;\r
105 vector  PLAYER_WEAPONSELECTION_RANGE = '0 20 -40';\r
106 \r
107 // weapon states (self.weaponentity.state)\r
108 float WS_CLEAR                  = 0; // no weapon selected\r
109 float WS_RAISE                  = 1; // raise frame\r
110 float WS_DROP                   = 2; // deselecting frame\r
111 float WS_INUSE                  = 3; // fire state\r
112 float WS_READY                  = 4; // idle frame\r
113 \r
114 // weapon requests\r
115 float WR_SETUP            = 1;  // setup weapon data\r
116 float WR_UPDATECOUNTS = 2;  // update ammo display\r
117 float WR_IDLE             = 3;  // idle frame\r
118 float WR_DROP             = 4;  // deselect frame\r
119 float WR_RAISE            = 5;  // select frame\r
120 float WR_FIRE1            = 6;  // primary fire frame\r
121 float WR_FIRE2            = 7;  // secondary fire\r
122 float WR_FIRE3            = 8;  // third fire\r
123 float WR_CHECKAMMO        = 9;  // checks ammo for weapon\r
124 float WR_CLEAR            = 10;  // runs afted deselecting frames, remove weapon parts (if presented). This useful for quake3-style chaingun\r
125 \r
126 // not part of weapon requests, but almost was, thus the naming convention\r
127 float WR_GRENADE1         = 11;\r
128 float WR_GRENADE2         = 12;\r
129 \r
130 // Weapon indexes\r
131 float WEP_LASER                         =  1; // float  IT_LASER                                = 4096;\r
132 float WEP_SHOTGUN                       =  2; // float  IT_SHOTGUN                              = 1;\r
133 float WEP_UZI                           =  3; // float  IT_UZI                                  = 2;\r
134 float WEP_GRENADE_LAUNCHER      =  4; // float  IT_GRENADE_LAUNCHER             = 4;\r
135 float WEP_ELECTRO                       =  5; // float  IT_ELECTRO                              = 8;\r
136 float WEP_CRYLINK                       =  6; // float  IT_CRYLINK                              = 16;\r
137 float WEP_NEX                           =  7; // float  IT_NEX                                  = 32;\r
138 float WEP_HAGAR                         =  8; // float  IT_HAGAR                                = 64;\r
139 float WEP_ROCKET_LAUNCHER       =  9; // float  IT_ROCKET_LAUNCHER              = 128;\r
140 float WEP_BOMBLETTS                     = 10;\r
141 float WEP_ROCKET_INCENDIARY     = 11;\r
142 float WEP_FLAMER                        = 12;\r
143 float WEP_HOTBOMBS                      = 13;\r
144 float WEP_GRAPPLE                       = 14;\r
145 float WEP_NAMEK                         = 15;\r
146 \r
147 float WEP_SCOUT_SPECIAL         = 50;\r
148 float WEP_SPY_SPECIAL           = 51;\r
149 float WEP_SOLDIER_SPECIAL       = 52;\r
150 float WEP_PYRO_SPECIAL          = 53;\r
151 float WEP_MEDIC_SPECIAL         = 54;\r
152 float WEP_ENGINEER_SPECIAL      = 55;\r
153 \r
154 float WEP_GRENADE_MIRV          = 60;\r
155 float WEP_GRENADE_FRAG          = 61;\r
156 \r
157 float WEP1      = 1;\r
158 float WEP2      = 2;\r
159 float WEP3      = 3;\r
160 float WEP4      = 4;\r
161 float WEP5      = 5;\r
162 \r
163 // For weapon cycling commands\r
164 float WEP_FIRST                         = 1;\r
165 float WEP_LAST                          = 5;//9;\r
166 \r
167 \r
168 \r
169 \r
170 \r
171 \r
172 \r
173 // class definitions\r
174 \r
175 float   CLASS_SCOUT             =  1;\r
176 float   CLASS_SPY               =  2;\r
177 float   CLASS_SOLDIER   =  4;\r
178 float   CLASS_PYRO              =  8;\r
179 float   CLASS_MEDIC             = 16;\r
180 float   CLASS_ENGINEER  = 32;\r
181 \r
182 .float team_no;\r
183 \r
184 .float  class;\r
185 .float  max_health;\r
186 .float  max_armor;\r
187 .float  mass;\r
188 .float  wpn;    // the weapon that's in the slot I've selected\r
189 .entity wpn5;   // what weapon I'm holding in my extra (5th) slot\r
190 //.float        oldclass;\r
191 .string change_mdl_on_respawn; // for changing class after death\r
192 \r
193 .float  special_active;\r
194 .float  special_time;\r
195 \r
196 .float  grenade_time;\r
197 \r
198 .float  jump_pad;       // true if just hit a jump pad (don't slow player when jump pads launch him)\r
199 \r
200 .entity onfire;         // world if not on fire, otherwise points to entity burning you\r
201 .float flame_heat;      // starts at 0.  Being near someone on fire raises it.  When it hits 1, the flame spreads to you.\r
202 .float flame_heat_time; // set when near a fire so code elsewhere knows to heat up instead of cool down\r
203 \r
204 .float  poison_damage;  // total damage poison will deal over time\r
205 .float  poison_rate;    // how fast to deal the poison\r
206 \r
207 .float create_time;     // tracks the time an entity was created to we can know which\r
208                                         // is the oldest when limiting the player's # of turrets or\r
209                                         // hotbombs, for example\r
210 \r
211 \r
212 .float buttonuse;       // 1 if player is using +use\r
213 \r
214 \r
215 // health regen/rot\r
216 .float  health_regen_delay;\r
217 .float  health_rot_delay;\r
218 .float  armor_regen_delay;\r
219 .float  armor_rot_delay;\r
220 \r
221 void DelayHealthRegen(entity e);\r
222 void DelayHealthRot(entity e);\r
223 void DelayArmorRegen(entity e);\r
224 void DelayArmorRot(entity e);\r
225 \r
226 \r
227 // grappling hook\r
228 .entity         hook;\r
229 void GrapplingHookFrame();\r
230 void RemoveGrapplingHook(entity pl);\r
231 \r
232 \r
233 \r
234 string NameOfClass(float cl);\r
235 float GetPlayerClass();\r
236 void ResetPlayerModel(entity pl);\r
237 void SetPlayerSpeed(entity pl);\r
238 \r
239 \r
240 // entity limiting function, to limit # of bombs etc a player can have.\r
241 float W_LimitNumEnts(string clname, float num_allowed, void() DeathFunc);\r
242 \r
243 // functions to let players cross lasergates\r
244 void PlayerLasergatePreThink();\r
245 void PlayerLasergatePostThink();\r
246 \r
247 void SpyCloakFlicker(entity pl);\r
248 \r
249 // BH Test Var\r
250 .float air_time;