]> icculus.org git repositories - divverent/nexuiz.git/blob - qcsrc/gamec/cl_impulse.c
added ctf and domination map support (uses g_ctf and g_domination cvars currently...
[divverent/nexuiz.git] / qcsrc / gamec / cl_impulse.c
1 void CopyBody(float keepvelocity);
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                 self.velocity = self.velocity + v_forward * 300;
32                 CopyBody(1);
33                 self.velocity = self.velocity - v_forward * 300;
34         }
35         else if (self.impulse == 99 && cvar("sv_cheats"))
36         {
37                 self.items = IT_LASER | IT_UZI | IT_SHOTGUN | IT_GRENADE_LAUNCHER | IT_ELECTRO | IT_CRYLINK | IT_NEX | IT_HAGAR | IT_ROCKET_LAUNCHER;
38                 self.ammo_shells = 100;
39                 self.ammo_nails = 200;
40                 self.ammo_rockets = 100;
41                 self.ammo_cells = 100;
42         }
43         //TetrisImpulses();
44         self.impulse = 0;
45 }