Sentry and Dispenser will sanitize the angles it inherits from the player now.
This commit is contained in:
parent
c1d8d69a77
commit
c9869626cc
2 changed files with 11 additions and 2 deletions
|
@ -222,7 +222,9 @@ TFCDispenser::Touch(entity eToucher)
|
||||||
void
|
void
|
||||||
TFCDispenser::Place(player pl)
|
TFCDispenser::Place(player pl)
|
||||||
{
|
{
|
||||||
SetAngles(pl.GetAngles());
|
vector newAngles = pl.GetAngles();
|
||||||
|
newAngles[0] = newAngles[2] = 0;
|
||||||
|
SetAngles(newAngles);
|
||||||
|
|
||||||
makevectors([0, pl.v_angle[1], 0]);
|
makevectors([0, pl.v_angle[1], 0]);
|
||||||
SetOrigin(pl.origin + (v_forward * 48));
|
SetOrigin(pl.origin + (v_forward * 48));
|
||||||
|
|
|
@ -27,6 +27,11 @@ TFCSentry::Think(void)
|
||||||
if (vlen(origin - p.origin) > 1024)
|
if (vlen(origin - p.origin) > 1024)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
print(sprintf("Is Facing? %d\n", IsFacing(p)));
|
||||||
|
|
||||||
|
if (IsFacing(p) == false)
|
||||||
|
continue;
|
||||||
|
|
||||||
/* find them */
|
/* find them */
|
||||||
traceline(origin, p.origin, MOVE_NORMAL, this);
|
traceline(origin, p.origin, MOVE_NORMAL, this);
|
||||||
if (trace_ent == p) {
|
if (trace_ent == p) {
|
||||||
|
@ -71,7 +76,9 @@ TFCSentry::Think(void)
|
||||||
void
|
void
|
||||||
TFCSentry::Place(NSClientPlayer pl)
|
TFCSentry::Place(NSClientPlayer pl)
|
||||||
{
|
{
|
||||||
SetAngles(pl.GetAngles());
|
vector newAngles = pl.GetAngles();
|
||||||
|
newAngles[0] = newAngles[2] = 0;
|
||||||
|
SetAngles(newAngles);
|
||||||
|
|
||||||
makevectors([0, pl.v_angle[1], 0]);
|
makevectors([0, pl.v_angle[1], 0]);
|
||||||
SetOrigin(pl.origin + (v_forward * 48));
|
SetOrigin(pl.origin + (v_forward * 48));
|
||||||
|
|
Loading…
Reference in a new issue