1 /*************************************
\r
2 Team:Nexuiz (NexTF) Definitions
\r
3 *************************************/
\r
5 /********************* General ***************************/
\r
6 string TN_VERSION = "alpha .01";
\r
8 float TF_FLARE_LIT = 0; // Woes of a decompiler, eh?
\r
9 float TF_FLARE_OFF = 1; ////
\r
11 float (entity e, float healamount, float ignore) T_Heal;
\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
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
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
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
51 .float playerclass; // TF's recognition of players. This will be set in accordance to tf playerclasses
\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
67 // Death Message (we should incorporate this into Team:Nexuiz some time)
\r
71 .float has_abbreviated; // for NetQuake's UpdateAbbreviation fucntion
\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
79 .entity observer_list;
\r
80 float cb_prematch_time;
\r
82 float civilianteams; // Are civilian teams allowed?
\r
84 float parems_decoded; // Have the parameters already been decoded - XavioR
\r
86 //Team Frags (old function -- possibly moot)
\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
96 .void() th_die; // wtf is this again..
\r
100 .void() th_missile;
\r
103 //switch teams function
\r
104 .string no_switch_team;
\r
105 .string switch_teams;
\r
108 .float is_feigning;
\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
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
124 .float is_dead; // temp // player is dead
\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
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
156 .float worldtype; // Not sure
\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
161 .float weaponmode; // I think only demoman and HWGuy use this, and since they're not in nextf.. poof
\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
167 .float maxstrafespeed;
\r
168 .float StatusRefreshTime; // The Status Bar
\r
169 .float StatusBarSize; ////
\r
170 .float StatusBarRes; ////
\r
173 .float current_menu;
\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
182 .float heat; // What tf uses for powering up weapons. Could be useful later?
\r
184 .float uses_bloom; // Does the client have bloom enabled? (used for flash bloom effect)
\r
189 .entity trigger_field;
\r
191 .string noise4; // MTF fucntion -- possibly moot.
\r
192 .string deathtype; // "You have the flag"
\r
194 .string team_str_home;
\r
195 .string team_str_moved;
\r
196 .string team_str_carried;
\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
203 /*********************************************************/
\r
204 ///////////////////////////////////////////////////////////
\r
205 /******************* Moved from:**************************/
\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
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
219 .float tf_items_flags;
\r
223 .float goal_activation;
\r
224 .float goal_effects;
\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
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
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
256 .vector orig_origin;
\r
257 .string activetarget;
\r
258 .string allowteams;
\r
262 void () TeamFortress_PrimeGrenade;
\r
263 void () TeamFortress_ThrowGrenade;
\r
264 void () NormalGrenadeTouch;
\r
265 void () NormalGrenadeExplode;
\r
269 .float dont_do_triggerwork;
\r
270 void (entity Goal, entity AP) DoGroupWork;
\r
271 void (entity Goal, entity AP) DoGoalWork;
\r
272 void () button_wait;
\r
273 void () SUB_Remove;
\r
276 .float super_damage_finished; // turrets can get super charged too!
\r
278 //idea: VorteX, LordHavoc (somebody else?)
\r
279 //DarkPlaces implementation: VorteX
\r
280 //builtin definitions:
\r
281 float(entity ent, string tagname) gettagindex = #451;
\r
282 vector(entity ent, float tagindex) gettaginfo = #452;
\r
284 //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
285 //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
288 float modelindex_null = 0;
\r
289 .float has_turretized_tesla; // is the player's tesla turretized?
\r
290 float modelindex_eyes = 0;
\r
294 .float impulse_wait; // time when player can next use an impulse
\r
298 .float is_building; // is the player in the middle of building something
\r
299 .float has_dispenser; // player has dispenser
\r
300 .float has_sentry; // player has sentry gun
\r
301 .float has_tesla; // player has tesla coil
\r
302 .float has_teleporter; // player has telepad (2 max)
\r
303 .float has_extractor; // player has metal extractor (3 max)
\r
304 .entity barrel_ent; // sentry gun's barrel entity
\r
305 .entity animation_ent; // an object's entity that controls its animations (dirty, but effective)
\r
306 .float weapons_carried; // used with tesla
\r
307 void () TeamFortress_FinishedBuilding;
\r
308 void () lvl1_sentry_stand;
\r
309 void (float tno, entity ignore, string st) teamsprint;
\r
310 .entity real_owner; // The building's real owner (the one who built it)
\r
312 .float current_weapon;
\r
315 .void(entity attacker, float damage) th_pain; // Function the building calls when it gets hurt
\r
318 /******************* End Moved From Section **************/
\r
319 ///////////////////////////////////////////////////////////
\r
320 /*************** Defs that need functions ****************/
\r
321 .float lives; // Amount of lives
\r
323 .float is_unabletospy; // picking up tfgoal makes the spy unable to go undercover
\r
324 .float owned_by; // Item is owned by team #
\r