1 void CopyBody(float keepvelocity);
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
9 void player_anim (void);
12 self.think = DummyThink;
13 self.nextthink = time;
21 void(entity e, vector v) printsurfaceinfo =
23 local float surfnum, numpoints, vnum;
26 surfnum = getsurfacenearpoint(e, v);
29 sprint(self, "texture: ");
30 s = getsurfacetexture(e, surfnum);
32 sprint(self, " normal: ");
33 n = getsurfacenormal(e, surfnum);
34 sprint(self, vtos(n));
36 numpoints = getsurfacenumpoints(e, surfnum);
37 sprint(self, ftos(numpoints));
38 sprint(self, " verts:");
40 while (vnum < numpoints)
43 n = getsurfacepoint(e, surfnum, vnum);
44 sprint(self, vtos(n));
47 sprint(self, " point tested: ");
48 sprint(self, vtos(v));
49 sprint(self, " nearest point on surface: ");
50 n = getsurfaceclippedpoint(e, surfnum, v);
51 sprint(self, vtos(n));
56 void ImpulseCommands (void)
63 if (imp >= 1 && imp <= 12)
65 // weapon switching impulses
72 else if (imp == 11) // last weapon
73 W_SwitchWeapon (self.cnt);
75 else if (imp >= 13 && imp <= 16)
77 if (cvar("sv_cheats"))
81 makevectors (self.v_angle);
82 self.velocity = self.velocity + v_forward * 300;
84 self.velocity = self.velocity - v_forward * 300;
90 sprint(self, strcat("origin = ", vtos(self.origin), "\n"));
91 sprint(self, strcat("angles = ", vtos(self.angles), "\n"));
101 sprint(self, strcat(s, ": ^", s, "color\n"));
104 sprint(self, strcat("origin = ", vtos(self.origin), "\n"));
111 if (self.weapon != WEP_LASER
112 && !cvar("g_minstagib") && !cvar("g_instagib")
113 && !cvar("g_rocketarena") && !cvar("g_lms") && cvar("g_pickup_items") && !cvar("g_nixnex"))
118 if (cvar("sv_cheats"))
120 makevectors(self.v_angle);
121 traceline(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 4096, FALSE, self);
122 if (trace_fraction < 1)
123 printsurfaceinfo(trace_ent, trace_endpos);
128 if (cvar("sv_cheats"))
130 self.items = IT_LASER | IT_UZI | IT_SHOTGUN | IT_GRENADE_LAUNCHER | IT_ELECTRO | IT_CRYLINK | IT_NEX | IT_HAGAR | IT_ROCKET_LAUNCHER;
131 self.ammo_shells = 999;
132 self.ammo_nails = 999;
133 self.ammo_rockets = 999;
134 self.ammo_cells = 999;