]> icculus.org git repositories - divverent/nexuiz.git/blob - qcsrc/gamec/cl_impulse.c
made cl_client.c compile again - you can not assign a string to a float field without...
[divverent/nexuiz.git] / qcsrc / gamec / cl_impulse.c
1 void CopyBody();
2
3 // changes by LordHavoc on 03/30/04
4 // cleaned up dummy code
5 // dummies are now removed eventually after being gibbed (norespawn = TRUE)
6 // dummy impulse now checks sv_cheats to prevent players from overwhelming server with dummies
7 // dummies now use player code where possible
8
9 void player_anim (void);
10 void DummyThink(void)
11 {
12         self.think = DummyThink;
13         self.nextthink = time;
14         SV_PlayerPhysics();
15         PlayerPreThink();
16         //player_anim();
17         PlayerPostThink();
18 }
19
20 void ImpulseCommands (void)
21 {
22         if (self.impulse >= 1 && self.impulse <= 9)
23                 W_SwitchWeapon (self.impulse);
24         else if (self.impulse == 10)
25                 W_NextWeapon ();
26         else if (self.impulse == 12)
27                 W_PreviousWeapon ();
28         else if (self.impulse == 13 && cvar("sv_cheats"))
29         {
30                 makevectors (self.v_angle);
31                 CopyBody();
32         }
33         else if (self.impulse == 97 && !self.crouch)
34         {
35                 self.crouch = TRUE;
36                 self.view_ofs_z = self.view_ofs_z - 20;
37         }
38         else if (self.impulse == 98 && self.crouch) {
39                 self.crouch = FALSE;
40                 self.view_ofs_z = self.view_ofs_z + 20;
41         }
42         else if (self.impulse == 99 && cvar("sv_cheats"))
43         {
44                 self.items = IT_LASER | IT_UZI | IT_SHOTGUN | IT_GRENADE_LAUNCHER | IT_ELECTRO | IT_CRYLINK | IT_NEX | IT_HAGAR | IT_ROCKET_LAUNCHER;
45                 self.ammo_shells = 100;
46                 self.ammo_nails = 200;
47                 self.ammo_rockets = 100;
48                 self.ammo_cells = 100;
49         }
50         //TetrisImpulses();
51         self.impulse = 0;
52 }