]> icculus.org git repositories - divverent/nexuiz.git/blob - TeamNexuiz/game/gamec/engineer.c
Added new GameC with class selection and random class selection working
[divverent/nexuiz.git] / TeamNexuiz / game / gamec / engineer.c
1 void EngineerSpecial()\r
2 {\r
3         sprint(self, "Not done yet\n");\r
4 }\r
5 \r
6 void EngineerGrenade(float req)\r
7 {\r
8         if(req == WR_GRENADE1)\r
9         {\r
10                 if(W_ThrowGrenade(W_ArmorGrenade))\r
11                         self.grenade_time = time + cvar("g_balance_grenade_armor_refire");\r
12         }\r
13         else if(req == WR_GRENADE2)\r
14         {\r
15 \r
16                 self.grenade_time = time + 2;\r
17         }\r
18 }\r
19 \r
20 void EngineerPreThink()\r
21 {\r
22 }\r
23 \r
24 void EngineerPostThink()\r
25 {\r
26 }\r
27 \r
28 void BecomeEngineer(float portion)\r
29 {\r
30         self.max_health = cvar("g_balance_class_engineer_health") * portion;\r
31 \r
32         self.max_armor = cvar("g_balance_class_engineer_armor") * portion;\r
33 \r
34         self.mass = cvar("g_balance_class_engineer_mass");\r
35 \r
36         SetPlayerSpeed(self);\r
37 \r
38         self.items = IT_WEP1 | IT_WEP2 | IT_WEP3 | IT_WEP4;\r
39         self.switchweapon = WEP2;\r
40         self.ammo_shells = floor(20 * portion);\r
41         self.ammo_nails = floor(20 * portion);\r
42         self.ammo_rockets = floor(1 * portion);\r
43         self.ammo_cells = floor(0 * portion);\r
44         self.playerclass = 9;           // TF P.C.\r
45         SetMaxAmmoFor (32);\r
46 }\r