1 float (entity e, float healamount, float ignore) T_Heal =
\r
7 if ((!ignore && (e.health >= e.max_health)))
\r
11 healamount = ceil (healamount);
\r
12 e.health = (e.health + healamount);
\r
13 if ((!ignore && (e.health >= e.max_health)))
\r
15 e.health = e.max_health;
\r
17 if ((e.health > 250))
\r
22 /* // There are no snipers in NexTF
\r
25 if ((e.health > 95))
\r
31 e.leg_damage = (e.leg_damage - ceil ((e.health / 20)));
\r
33 if ((e.leg_damage < 1))
\r
37 TeamFortress_SetSpeed (e);
\r
42 // Pre-Packed TeamNexuiz items/entities :)
\r
59 // Moved the below to tfdefs. These are the "Map_Rules" entity's class restricts.
\r
60 /*.float team1_scout, team1_soldier, team1_medic, team1_pyro, team1_spy, team1_engineer;
\r
61 .float team2_scout, team2_soldier, team2_medic, team2_pyro, team2_spy, team2_engineer;
\r
62 .float team3_scout, team3_soldier, team3_medic, team3_pyro, team3_spy, team3_engineer;
\r
63 .float team4_scout, team4_soldier, team4_medic, team4_pyro, team4_spy, team4_engineer;*/
\r
67 local entity infoent; // our class restricts info entity is spaned here
\r
69 infoent.classname = "class_restrictions";
\r
70 copyentity (self, infoent);
\r
72 // Amount of teams available on a map are determined by spawn points
\r
73 if (self.team1limit)
\r
74 self.ammo_medikit = stof(self.team1limit);
\r
75 if (self.team2limit)
\r
76 self.ammo_detpack = stof(self.team2limit);
\r
77 if (self.team3limit)
\r
78 self.maxammo_medikit = stof(self.team3limit);
\r
79 if (self.team4limit)
\r
80 self.maxammo_detpack = stof(self.team4limit);
\r
85 // Team:Nexuiz backpack
\r
86 void () item_backpack =
\r
88 if ((!self.mdl) && (!self.model))
\r
90 self.model = "models/objects/backpack/backpack.md3";
\r
93 self.ammo_cells = stof(self.cells);
\r
95 self.ammo_shells = stof(self.shells);
\r
97 self.ammo_rockets = stof(self.rockets);
\r
99 self.ammo_nails = stof(self.nails);
\r
101 self.ammo_metal = stof(self.metal);
\r
103 self.no_grenades_1 = stof(self.grenade1);
\r
105 self.no_grenades_2 = stof(self.grenade2);
\r
107 self.armorvalue = stof(self.armor);
\r
108 if ((!self.delay) && (!self.wait))
\r
109 self.wait = 10; // next time item can be used
\r
110 self.give = "converted";
\r
112 ConvertToBackPack(); // finish conversion using q3f conversion func
\r
115 // Team:Nexuiz ctf flag (needs to be capped at an item_ctf_goal
\r
116 void () item_ctf_flag =
\r
118 if (!self.allowteams)
\r
120 bprint("Fixme!! Object located at ",vtos(self.origin)," has no allowteams property set!\n");
\r
123 if ((!self.delay) && (!self.wait))
\r
125 self.wait = 45; // next time item can be used
\r
128 if (!self.carried_message)
\r
129 self.carried_message = "You have the flag! Go capture it in your base!\n";
\r
130 if (self.allowteams == "red")
\r
132 self.mdl = "models/flags/b_flag.md3";
\r
133 self.groupname = "redflag";
\r
135 else if (self.allowteams == "blue")
\r
137 self.groupname = "blueflag";
\r
138 self.mdl = "models/flags/r_flag.md3";
\r
144 // where you cap item_ctf_flag or flags spawned by tfq3fitems.c
\r
145 .string cap_message;
\r
146 void () item_ctf_goal =
\r
148 if (!self.teamscore) // how many frags are gained by capturing
\r
149 self.teamscore = 10;
\r
151 self.message = "You ÃÁÐÔÕÒÅÄ the ÅÎÅÍÙ flag!\n";
\r
152 if (!self.cap_message)
\r
153 self.netname = "Blue brings home the Flag";
\r
154 if (self.allowteams == "blue")
\r
156 else if (self.allowteams == "red")
\r