1 void CopyBody(float keepvelocity);
\r
3 // changes by LordHavoc on 03/30/04
\r
4 // cleaned up dummy code
\r
5 // dummies are now removed eventually after being gibbed (norespawn = TRUE)
\r
6 // dummy impulse now checks sv_cheats to prevent players from overwhelming server with dummies
\r
7 // dummies now use player code where possible
\r
9 void player_anim (void);
\r
10 void DummyThink(void)
\r
12 self.think = DummyThink;
\r
13 self.nextthink = time;
\r
20 void CopyBody2(float keepvelocity, float testbody);
\r
21 void ImpulseCommands (void)
\r
25 if (self.team_no < 1) // Bring up choose team menu if not on team
\r
27 stuffcmd(self, "menu_showteamselect\n");
\r
31 if (self.impulse == 71)
\r
34 whee = ftos (self.maxammo_rockets);
\r
39 if (self.impulse == 70) { // reload impulse
\r
41 if(self.class == CLASS_SOLDIER)
\r
44 DoReload (3, (CLIP_MAX_ROCKETS - self.clip_rockets)); // weapon type 3 is RL, and reload X rockets.
\r
46 else if(self.class == CLASS_PYRO)
\r
49 DoReload (4, (CLIP_MAX_PIPEGRENADES - self.clip_pipegrenades));
\r
51 else if(self.class == CLASS_SCOUT || self.class == CLASS_ENGINEER)
\r
54 DoReload (2, (CLIP_MAX_CRYLINK - self.clip_crylink));
\r
57 if (self.impulse == 69) {
\r
58 local entity isneardoor;
\r
60 isneardoor = findradius (self.origin, 200);
\r
63 if ((isneardoor.classname == "door"))
\r
65 // st = stos(isneardoor.model);
\r
66 sprint (self, isneardoor.model);
\r
67 sprint (self, "\n");
\r
71 isneardoor = isneardoor.chain;
\r
74 if (self.impulse == 8) {
\r
75 TeamFortress_ThrowGrenade(); }
\r
76 if ((self.impulse == 150)) // GREN TYPE 1
\r
78 TeamFortress_PrimeGrenade();
\r
80 /* if ((self.impulse == 151)) // GREN TYPE 2
\r
82 TeamFortress_PrimeGrenade();
\r
84 if ((self.impulse == 152))
\r
86 TeamFortress_ThrowGrenade();
\r
89 if (self.impulse >= 1 && self.impulse <= 5)
\r
93 if(self.impulse == 5 && self.wpn5.weapon)
\r
95 weapon_action(self.weapon, WR_DROP);
\r
96 SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.wpn5.weapon);
\r
99 self.switchweapon = w_getbestweapon(self);
\r
100 if(self.switchweapon == WEP5)
\r
101 self.switchweapon = WEP1;
\r
105 if (self.reload_time < time) {
\r
106 W_SwitchWeapon (self.impulse); }
\r
108 else if (self.impulse == 10)
\r
109 if (self.reload_time < time) {
\r
111 else if (self.impulse == 12)
\r
112 if (self.reload_time < time) {
\r
113 W_PreviousWeapon (); }
\r
114 else if (self.impulse == 13 && cvar("sv_cheats"))
\r
116 makevectors (self.v_angle);
\r
117 self.velocity = self.velocity + v_forward * 300;
\r
118 CopyBody2(1, TRUE);
\r
119 self.velocity = self.velocity - v_forward * 300;
\r
121 else if (self.impulse == 14 && cvar("sv_cheats"))
\r
122 CopyBody2(0, TRUE);
\r
123 else if (self.impulse == 99 && cvar("sv_cheats"))
\r
125 self.items = IT_WEP1 | IT_WEP2 | IT_WEP3 | IT_WEP4 | IT_WEP5;
\r
126 self.ammo_shells = 999;
\r
127 self.ammo_nails = 999;
\r
128 self.ammo_rockets = 999;
\r
129 self.ammo_cells = 999;
\r
132 if(self.impulse == 20)
\r
137 if(self.impulse == 30)
\r
139 ClassGrenade(WR_GRENADE1);
\r
141 if(self.impulse == 31)
\r
143 ClassGrenade(WR_GRENADE2);
\r
146 // model/class test
\r
147 if(self.impulse == 57)
\r
149 //self.class = GetPlayerClass();
\r
150 sprint(self, "Current class: ");
\r
151 sprint(self, NameOfClass(self.class));
\r
152 sprint(self, ", model: ");
\r
153 sprint(self, self.playermodel);
\r
154 sprint(self, "\n");
\r
156 if(self.impulse == 211) // XavioR test impulse
\r
158 local string woottest;
\r
159 woottest = ftos(self.team_no);
\r
160 sprint (self, woottest);
\r
161 sprint (self, "\n");
\r
163 //TetrisImpulses();
\r