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