]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/gamec/cl_impulse.c
new gamemode: "Last Man Standing" (g_lms)
[divverent/nexuiz.git] / data / 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 && !cvar("g_minstagib"))
23                 W_SwitchWeapon (self.impulse);
24         else if (self.impulse == 10 && !cvar("g_minstagib"))
25                 W_NextWeapon ();
26         else if (self.impulse == 12 && !cvar("g_minstagib"))
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 == 14 && cvar("sv_cheats"))
36                 CopyBody(0);
37         else if (self.impulse == 15 && cvar("sv_cheats"))
38         {
39                 sprint(self, strcat("origin = ", vtos(self.origin), "\n"));
40         }
41         else if (self.impulse == 16 && cvar("sv_cheats"))
42         {
43                 float i;
44                 string s;
45                 i=1;
46                 while(i <= 10)
47                 {
48                         s = ftos(i);
49                         sprint(self, strcat(s, ": ^", s, "color\n"));
50                         i = i + 1;
51                 }
52                 sprint(self, strcat("origin = ", vtos(self.origin), "\n"));
53         }
54         else if (self.impulse == 99 && cvar("sv_cheats"))
55         {
56                 self.items = IT_LASER | IT_UZI | IT_SHOTGUN | IT_GRENADE_LAUNCHER | IT_ELECTRO | IT_CRYLINK | IT_NEX | IT_HAGAR | IT_ROCKET_LAUNCHER;
57                 self.ammo_shells = 999;
58                 self.ammo_nails = 999;
59                 self.ammo_rockets = 999;
60                 self.ammo_cells = 999;
61         }
62         // lms debug
63         else if(self.impulse == 66)
64         {
65                 bprint("^3total:    ");
66                 bprint(ftos(player_count));
67                 bprint("\n");
68                 bprint("^3dead:     ");
69                 bprint(ftos(lms_dead_count));
70                 bprint("\n");
71                 bprint("^3lowest:   ");
72                 bprint(ftos(lms_lowest_lives));
73                 bprint("\n");
74         }
75         //TetrisImpulses();
76         self.impulse = 0;
77 }