]> icculus.org git repositories - divverent/nexuiz.git/blob - TeamNexuiz/game/gamec/tfdefs.c
- Balanced the ricochet rocket
[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 last_impulse;\r
137 .float real_frags;\r
138 .float items_allowed;\r
139 .float super_time;              // no idea(?)\r
140 .float super_sound;             ////\r
141 .float invisible_finished;              // Not a NexTF function(?)\r
142 .float invisible_time;                  ////\r
143 .float radsuit_finished;                // BioSuit(?)\r
144 .float rad_time;                                ////\r
145 .float distance;                // My guess is that this is whatever TF uses to store entity distances\r
146                                                 // from each other?\r
147 .float volume;\r
148 .float option5;\r
149 \r
150 .float worldtype;                       // Not sure\r
151 \r
152 .float armorclass;      // How will nexTF's armor class work? \r
153                                         // It's a good thing to have in anyways I guess.\r
154 \r
155 .float weaponmode;      //      I think only demoman and HWGuy use this, and since they're not in nextf.. poof\r
156 \r
157                                         // The TF State\r
158 .float tfstate; // State of the player according to quake TF.\r
159                                 // I will try to satisfy it for NexTF after the goal porting is done.\r
160 .float maxfbspeed;\r
161 .float maxstrafespeed;\r
162 .float StatusRefreshTime;               // The Status Bar\r
163 .float StatusBarSize;                   ////\r
164 .float StatusBarRes;                    ////\r
165 \r
166 // MENU STUFF\r
167 .float current_menu;\r
168 .float menu_count;\r
169 \r
170 .float pistol_fired;                            // has the pistol been fired? 1 - yes, 2- no\r
171 .float next_pistol_fire;                        // pistol cannot be fired again until this value < time\r
172                                                                         //// check W_WeaponFrame for more detail on these 2\r
173 \r
174 // WEAPON STUFF\r
175 .float next_nuke;\r
176 .float heat;            // What tf uses for powering up weapons. Could be useful later?\r
177 \r
178 .float uses_bloom;              // Does the client have bloom enabled? (used for flash bloom effect)\r
179 \r
180 entity otemp;\r
181 entity stemp;\r
182 \r
183 .entity trigger_field;\r
184 \r
185 .string noise4;         // MTF fucntion -- possibly moot.\r
186 .string deathtype;              // "You have the flag"\r
187 \r
188 .string team_str_home;\r
189 .string team_str_moved;\r
190 .string team_str_carried;\r
191 \r
192 void (entity targ, entity inflictor, entity attacker, float damage) T_Damage;\r
193 void (entity targ, entity inflictor, entity attacker, float damage, float T_flags, float T_AttackType) TF_T_Damage;\r
194 void (entity Viewer, float pc, float rpc) TeamFortress_PrintClassName;\r
195 void (float classnum) SetMaxAmmoFor;\r
196 \r
197 /*********************************************************/\r
198 ///////////////////////////////////////////////////////////\r
199 /******************* Moved from:**************************/\r
200 //tffunctions\r
201 .float nextpc;          // for qued next player class -- we gonna use this?\r
202 .float DropFlagDelay;           // next time player can drop a flag\r
203 void (string halias, float himpulse1, float himpulse2) TeamFortress_Alias;\r
204 string () ChooseRandomClass;\r
205 \r
206 // tfcombat:\r
207 .float invincible_time;         //Pent effect time\r
208 .float invincible_sound;        //Pent hit sound\r
209 void (entity inflictor, entity attacker, float damage, entity ignore) T_RadiusDamage;\r
210 \r
211 // tfmapitems:\r
212 .float tf_items;\r
213 .float tf_items_flags;\r
214 .float goal_no;\r
215 .float group_no;\r
216 .float goal_state;\r
217 .float goal_activation;\r
218 .float goal_effects;\r
219 .float goal_group;\r
220 .float activate_goal_no;\r
221 .float inactivate_goal_no;\r
222 .float if_goal_is_active;\r
223 .float if_goal_is_inactive;\r
224 .float if_goal_is_removed;\r
225 .float if_group_is_active;\r
226 .float if_group_is_inactive;\r
227 .float if_group_is_removed;\r
228 .float remove_goal_no;\r
229 .float restore_goal_no;\r
230 .float activate_group_no;\r
231 .float inactivate_group_no;\r
232 .float remove_group_no;\r
233 .float restore_group_no;\r
234 .float has_item_from_group;\r
235 .float remove_item_group;\r
236 .float return_item_no;\r
237 .entity tent;                           // player who touches flag (touch ent?)\r
238 \r
239 // tfplats\r
240 .float height;\r
241 .entity movetarget;\r
242 void () SUB_CalcMoveDone;\r
243 void (vector tdest, float tspeed, void() func) SUB_CalcMove;\r
244 void (entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt;\r
245 \r
246 // tfq3fitems\r
247 .string is_converted_goal; // This is used to identify converted goals (helps me determine spawn in q3f maps)\r
248 .string groupname;                 // generally gets set to blueflag or redflag\r
249 float q3fdetect;\r
250 .vector orig_origin;\r
251 .string activetarget;\r
252 .string allowteams;\r
253 void () i_p_t;\r
254 \r
255 // tfgrenades\r
256 void () TeamFortress_PrimeGrenade;\r
257 void () TeamFortress_ThrowGrenade;\r
258 void () NormalGrenadeTouch;\r
259 void () NormalGrenadeExplode;\r
260 float () crandom;\r
261 \r
262 // tfsubs\r
263 .float dont_do_triggerwork;\r
264 void (entity Goal, entity AP) DoGroupWork;\r
265 void (entity Goal, entity AP) DoGoalWork;\r
266 void () button_wait;\r
267 void () SUB_Remove;\r
268 \r
269 // tfsentry\r
270 .float super_damage_finished;           // turrets can get super charged too!\r
271 //DP_QC_GETTAGINFO\r
272 //idea: VorteX, LordHavoc (somebody else?)\r
273 //DarkPlaces implementation: VorteX\r
274 //builtin definitions:\r
275 float(entity ent, string tagname) gettagindex = #451;\r
276 vector(entity ent, float tagindex) gettaginfo = #452;\r
277 //description:\r
278 //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
279 //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
280 \r
281 //tftesla\r
282 float modelindex_null    = 0;\r
283 .float has_turretized_tesla;                    // is the player's tesla turretized?\r
284 float modelindex_eyes    = 0;\r
285 \r
286 //       non-tf files\r
287 // cl_impulses\r
288 .float impulse_wait;            // time when player can next use an impulse\r
289 \r
290 //       classes\r
291 // engiener\r
292 .float is_building;                     // is the player in the middle of building something\r
293 .float has_dispenser;           // player has dispenser\r
294 .float has_sentry;                      // player has sentry gun\r
295 .float has_tesla;                       // player has tesla coil\r
296 .float has_teleporter;          // player has telepad (2 max)\r
297 .entity barrel_ent;                     // sentry gun's barrel entity\r
298 .entity animation_ent;          // an object's entity that controls its animations (dirty, but effective)\r
299 .float weapons_carried;         // used with tesla\r
300 void () TeamFortress_FinishedBuilding;\r
301 void () lvl1_sentry_stand;\r
302 void (float tno, entity ignore, string st) teamsprint;\r
303 .entity real_owner;                                                                     // The building's real owner (the one who built it)\r
304 .entity oldenemy;\r
305 .float current_weapon;\r
306 .float waitmin;\r
307 .float waitmax;\r
308 .void(entity attacker, float damage) th_pain;           // Function the building calls when it gets hurt\r
309                                                                                                         // fixme!  XavioR\r
310 \r
311 /******************* End Moved From Section **************/\r
312 ///////////////////////////////////////////////////////////\r
313 /*************** Defs that need functions ****************/\r
314 .float lives;                   // Amount of lives\r
315 float toggleflags;\r
316 .float is_unabletospy;          // picking up tfgoal makes the spy unable to go undercover\r
317 .float owned_by;                // Item is owned by team #\r
318 \r