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