]> icculus.org git repositories - divverent/nexuiz.git/blob - TeamNexuiz/game/gamec/tfdefs.c
- Put Client Commands in a seperate file
[divverent/nexuiz.git] / TeamNexuiz / game / gamec / tfdefs.c
1 /*************************************\r
2         Team:Nexuiz (NexTF) Definitions\r
3 *************************************/\r
4 \r
5 /********************* General ***************************/\r
6 string TN_VERSION =                             "alpha .01";\r
7 \r
8 float TF_FLARE_LIT = 0;         // Woes of a decompiler, eh?\r
9 float TF_FLARE_OFF = 1;         ////\r
10 float CTF_Map;\r
11 float (entity e, float healamount, float ignore) T_Heal;\r
12 \r
13 // Temporary Defs (till I implement real systems for these)\r
14 //float joinorder;              // menu implemented :)\r
15 .float undercover_team;                         // is undercover as team number... Are we gonna use this one, wazat?\r
16 .float is_undercover;                           // is just undercover..\r
17 \r
18 // Team Scores\r
19 float team1score;\r
20 float team2score;\r
21 float team3score;\r
22 float team4score;\r
23 \r
24 // Team Colors\r
25 float team1col;\r
26 float team2col;\r
27 float team3col;\r
28 float team4col;\r
29 \r
30 // Legal Classes\r
31 float illegalclasses/*    = 0*/;\r
32 float illegalclasses1;\r
33 float illegalclasses2;\r
34 float illegalclasses3;\r
35 float illegalclasses4;\r
36 float civilianteams;\r
37 \r
38 //These are the "Map_Rules" entity's class restricts.\r
39 .float team1_scout, team1_soldier, team1_medic, team1_pyro, team1_spy, team1_engineer;\r
40 .float team2_scout, team2_soldier, team2_medic, team2_pyro, team2_spy, team2_engineer;\r
41 .float team3_scout, team3_soldier, team3_medic, team3_pyro, team3_spy, team3_engineer;\r
42 .float team4_scout, team4_soldier, team4_medic, team4_pyro, team4_spy, team4_engineer;\r
43 .float team1_civilian, team2_civilian, team3_civilian, team4_civilian;\r
44 \r
45 // Last Spawn Place of Team\r
46 entity lastspawn_team1;\r
47 entity lastspawn_team2;\r
48 entity lastspawn_team3;\r
49 entity lastspawn_team4;\r
50 \r
51 .float playerclass;                     // TF's recognition of players. This will be set in accordance to tf playerclasses\r
52 \r
53 // TF Class Numbers\r
54 float TF_CLASS_SCOUT = 1;\r
55 float TF_CLASS_SNIPER = 2;              //not in NexTF\r
56 float TF_CLASS_SOLDIER = 3;\r
57 float TF_CLASS_DEMOMAN = 4;             //not in NexTF\r
58 float TF_CLASS_MEDIC = 5;\r
59 float TF_CLASS_HWGUY = 6;               //not in NexTF\r
60 float TF_CLASS_PYRO = 7;\r
61 float TF_CLASS_SPY = 8;\r
62 float TF_CLASS_ENGINEER = 9;\r
63 float TF_CLASS_RANDOM = 10;                     \r
64 float TF_CLASS_CIVILIAN = 11;           \r
65 .float respawn_as_new_class;    // what class the player will respawn as in accordance to tf's .playerclass\r
66 \r
67 // Death Message (we should incorporate this into Team:Nexuiz some time)\r
68 float deathmsg;\r
69 \r
70 // Hmm?\r
71 .float has_abbreviated;         // for NetQuake's UpdateAbbreviation fucntion\r
72 .float hn_i_g;\r
73 .float hasnt_item_from_group;\r
74 float flagem_checked;\r
75 .float tp_grenades_1;\r
76 .float tp_grenades_2;\r
77 .float camdist;\r
78 .vector camangle;\r
79 .entity observer_list;\r
80 float cb_prematch_time;\r
81 \r
82 float civilianteams;    // Are civilian teams allowed?\r
83 \r
84 float parems_decoded;           // Have the parameters already been decoded - XavioR\r
85 \r
86 //Team Frags                    (old function -- possibly moot)\r
87 float team1frags;\r
88 float team2frags;\r
89 float team3frags;\r
90 float team4frags;\r
91 \r
92 //FlagExists floats so that a team flag isnt spawned twice by the Q3F conversion code\r
93 float redflagexists;\r
94 float blueflagexists;\r
95 \r
96 .void() th_die;         // wtf is this again..\r
97 .void() th_stand;\r
98 .void() th_walk;\r
99 .void() th_run;\r
100 .void() th_missile;\r
101 .void() th_melee;\r
102 \r
103 //switch teams function\r
104 .string no_switch_team;\r
105 .string switch_teams;\r
106 \r
107 // spy feign\r
108 .float is_feigning;\r
109 \r
110 // Weapon Clips\r
111 .float reload_time;\r
112 .float clip_pistol;\r
113 .float clip_crylink;\r
114 .float clip_rockets;\r
115 .float clip_pipegrenades;\r
116 float CLIP_MAX_PISTOL = 10;\r
117 float CLIP_MAX_CRYLINK = 8;\r
118 float CLIP_MAX_ROCKETS = 4;\r
119 float CLIP_MAX_PIPEGRENADES = 6;\r
120 \r
121 .vector head_shot_vector;               // vector railgun_hitlocation\r
122 .float leg_damage;                              // amount of times a player has been hit in the legs\r
123 \r
124 .float is_dead;                 // temp         // player is dead\r
125 \r
126 .float immune_to_check;         // How long player is immune to cheat check?\r
127                                                         //// Personally i think I'm jsut gonna implement krimzon's\r
128                                                         //// ParseClientCommand to check color change cheats. - XavioR\r
129 .float axhitme;                 // Goal Item (I think) -- if ax hits then blah\r
130                                                 // There's no axe in nexuiz tho.... :/\r
131 .float armor_allowed;           //\r
132 .float maxarmor;                        ////\r
133 .float ammo_medikit;\r
134 .float maxammo_medikit;\r
135 .float ammo_detpack;\r
136 .float maxammo_detpack;\r
137 .float maxammo_shells;\r
138 .float maxammo_nails;\r
139 .float maxammo_cells;\r
140 .float maxammo_rockets;\r
141 .float maxammo_metal;                           // maximum amoutn of metal that can be carried\r
142 .float last_impulse;\r
143 .float real_frags;\r
144 .float items_allowed;\r
145 .float super_time;              // no idea(?)\r
146 .float super_sound;             ////\r
147 .float invisible_finished;              // Not a NexTF function(?)\r
148 .float invisible_time;                  ////\r
149 .float radsuit_finished;                // BioSuit(?)\r
150 .float rad_time;                                ////\r
151 .float distance;                // My guess is that this is whatever TF uses to store entity distances\r
152                                                 // from each other?\r
153 .float volume;\r
154 .float option5;\r
155 \r
156 .float worldtype;                       // Not sure\r
157 \r
158 .float armorclass;      // How will nexTF's armor class work? \r
159                                         // It's a good thing to have in anyways I guess.\r
160 \r
161 .float weaponmode;      //      I think only demoman and HWGuy use this, and since they're not in nextf.. poof\r
162 \r
163                                         // The TF State\r
164 .float tfstate; // State of the player according to quake TF.\r
165                                 // I will try to satisfy it for NexTF after the goal porting is done.\r
166 .float maxfbspeed;\r
167 .float maxstrafespeed;\r
168 .float StatusRefreshTime;               // The Status Bar\r
169 .float StatusBarSize;                   ////\r
170 .float StatusBarRes;                    ////\r
171 \r
172 // MENU STUFF\r
173 .float current_menu;\r
174 .float menu_count;\r
175 \r
176 .float pistol_fired;                            // has the pistol been fired? 1 - yes, 2- no\r
177 .float next_pistol_fire;                        // pistol cannot be fired again until this value < time\r
178                                                                         //// check W_WeaponFrame for more detail on these 2\r
179 \r
180 // WEAPON STUFF\r
181 .float next_nuke;\r
182 .float heat;            // What tf uses for powering up weapons. Could be useful later?\r
183 \r
184 .float uses_bloom;              // Does the client have bloom enabled? (used for flash bloom effect)\r
185 \r
186 entity otemp;\r
187 entity stemp;\r
188 \r
189 .entity trigger_field;\r
190 \r
191 .string noise4;         // MTF fucntion -- possibly moot.\r
192 .string deathtype;              // "You have the flag"\r
193 \r
194 .string team_str_home;\r
195 .string team_str_moved;\r
196 .string team_str_carried;\r
197 \r
198 void (entity targ, entity inflictor, entity attacker, float damage) T_Damage;\r
199 void (entity targ, entity inflictor, entity attacker, float damage, float T_flags, float T_AttackType) TF_T_Damage;\r
200 void (entity Viewer, float pc, float rpc) TeamFortress_PrintClassName;\r
201 void (float classnum) SetMaxAmmoFor;\r
202 \r
203 /*********************************************************/\r
204 ///////////////////////////////////////////////////////////\r
205 /******************* Moved from:**************************/\r
206 //tffunctions\r
207 .float nextpc;          // for qued next player class -- we gonna use this?\r
208 .float DropFlagDelay;           // next time player can drop a flag\r
209 void (string halias, float himpulse1, float himpulse2) TeamFortress_Alias;\r
210 string () ChooseRandomClass;\r
211 \r
212 // tfcombat:\r
213 .float invincible_time;         //Pent effect time\r
214 .float invincible_sound;        //Pent hit sound\r
215 void (entity inflictor, entity attacker, float damage, entity ignore) T_RadiusDamage;\r
216 \r
217 // tfmapitems:\r
218 .float tf_items;\r
219 .float tf_items_flags;\r
220 .float goal_no;\r
221 .float group_no;\r
222 .float goal_state;\r
223 .float goal_activation;\r
224 .float goal_effects;\r
225 .float goal_group;\r
226 .float activate_goal_no;\r
227 .float inactivate_goal_no;\r
228 .float if_goal_is_active;\r
229 .float if_goal_is_inactive;\r
230 .float if_goal_is_removed;\r
231 .float if_group_is_active;\r
232 .float if_group_is_inactive;\r
233 .float if_group_is_removed;\r
234 .float remove_goal_no;\r
235 .float restore_goal_no;\r
236 .float activate_group_no;\r
237 .float inactivate_group_no;\r
238 .float remove_group_no;\r
239 .float restore_group_no;\r
240 .float has_item_from_group;\r
241 .float remove_item_group;\r
242 .float return_item_no;\r
243 .entity tent;                           // player who touches flag (touch ent?)\r
244 \r
245 // tfplats\r
246 .float height;\r
247 .entity movetarget;\r
248 void () SUB_CalcMoveDone;\r
249 void (vector tdest, float tspeed, void() func) SUB_CalcMove;\r
250 void (entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt;\r
251 \r
252 // tfq3fitems\r
253 .string is_converted_goal; // This is used to identify converted goals (helps me determine spawn in q3f maps)\r
254 .string groupname;                 // generally gets set to blueflag or redflag\r
255 float q3fdetect;\r
256 .vector orig_origin;\r
257 .string activetarget;\r
258 .string allowteams;\r
259 .string give;\r
260 void () i_p_t;\r
261 void (entity goal) ParseGive;\r
262 \r
263 // tfgrenades\r
264 void () TeamFortress_PrimeGrenade;\r
265 void () TeamFortress_ThrowGrenade;\r
266 void () NormalGrenadeTouch;\r
267 void () NormalGrenadeExplode;\r
268 float () crandom;\r
269 \r
270 // tfsubs\r
271 .float dont_do_triggerwork;\r
272 void (entity Goal, entity AP) DoGroupWork;\r
273 void (entity Goal, entity AP) DoGoalWork;\r
274 void () button_wait;\r
275 void () SUB_Remove;\r
276 \r
277 // tfhud\r
278 void (entity ownr, float selection) TeamNexuiz_HUD_ShowSign;            // show sprite icon\r
279 \r
280 // tfsentry\r
281 .float super_damage_finished;           // turrets can get super charged too!\r
282 //DP_QC_GETTAGINFO\r
283 //idea: VorteX, LordHavoc (somebody else?)\r
284 //DarkPlaces implementation: VorteX\r
285 //builtin definitions:\r
286 float(entity ent, string tagname) gettagindex = #451;\r
287 vector(entity ent, float tagindex) gettaginfo = #452;\r
288 //description:\r
289 //gettagindex returns the number of a tag on an entity, this number is the same as set by setattachment (in the .tag_index field), allowing the qc to save a little cpu time by keeping the number around if it wishes (this could already be done by calling setattachment and saving off the tag_index).\r
290 //gettaginfo returns the origin of the tag in worldspace and sets v_forward, v_right, and v_up to the current orientation of the tag in worldspace, this automatically resolves all dependencies (attachments, including viewmodelforclient), this means you could fire a shot from a tag on a gun entity attached to the view for example.\r
291 \r
292 //tftesla\r
293 float modelindex_null    = 0;\r
294 .float has_turretized_tesla;                    // is the player's tesla turretized?\r
295 float modelindex_eyes    = 0;\r
296 \r
297 //       non-tf files\r
298 // cl_impulses\r
299 .float impulse_wait;            // time when player can next use an impulse\r
300 \r
301 //       classes\r
302 // engiener\r
303 .float is_building;                     // is the player in the middle of building something\r
304 .float has_dispenser;           // player has dispenser\r
305 .float has_sentry;                      // player has sentry gun\r
306 .float has_tesla;                       // player has tesla coil\r
307 .float has_teleporter;          // player has telepad (2 max)\r
308 .float has_extractor;           // player has metal extractor (3 max)\r
309 .entity barrel_ent;                     // sentry gun's barrel entity\r
310 .entity animation_ent;          // an object's entity that controls its animations (dirty, but effective)\r
311 .float weapons_carried;         // used with tesla\r
312 void () TeamFortress_FinishedBuilding;\r
313 void () lvl1_sentry_stand;\r
314 void (float tno, entity ignore, string st) teamsprint;\r
315 .entity real_owner;                                                                     // The building's real owner (the one who built it)\r
316 .entity oldenemy;\r
317 .float current_weapon;\r
318 .float waitmin;\r
319 .float waitmax;\r
320 .void(entity attacker, float damage) th_pain;           // Function the building calls when it gets hurt\r
321                                                                                                         // fixme!  XavioR\r
322 \r
323 /******************* End Moved From Section **************/\r
324 ///////////////////////////////////////////////////////////\r
325 /*************** Defs that need functions ****************/\r
326 .float lives;                   // Amount of lives\r
327 float toggleflags;\r
328 .float is_unabletospy;          // picking up tfgoal makes the spy unable to go undercover\r
329 .float owned_by;                // Item is owned by team #\r
330 \r