PMove: Move some things around a bit.
This commit is contained in:
parent
70c2b43ff3
commit
17611b7d38
2 changed files with 6 additions and 9 deletions
|
@ -100,16 +100,16 @@ NSTrigger::GetMaster(void)
|
|||
|
||||
/* we couldn't find it, so let's not even bother going further */
|
||||
if (!t) {
|
||||
print(sprintf("^2%s::^3GetMaster^7: Invalid master (%s), return success\n",
|
||||
dprint(sprintf("^2%s::^3GetMaster^7: Invalid master (%s), return success\n",
|
||||
this.classname, m_strMaster));
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (t.GetValue() == 1)
|
||||
print(sprintf("^2%s::^3GetMaster^7: %s learns %s ^2POSITIVE\n",
|
||||
dprint(sprintf("^2%s::^3GetMaster^7: %s learns %s ^2POSITIVE\n",
|
||||
this.classname, targetname, m_strMaster));
|
||||
else
|
||||
print(sprintf("^2%s::^3GetMaster^7: %s learns %s ^1NEGATIVE\n",
|
||||
dprint(sprintf("^2%s::^3GetMaster^7: %s learns %s ^1NEGATIVE\n",
|
||||
this.classname, targetname, m_strMaster));
|
||||
|
||||
return t.GetValue();
|
||||
|
|
|
@ -91,6 +91,8 @@ PMoveCustom_Categorize(void)
|
|||
} else {
|
||||
self.flags &= ~FL_ONGROUND;
|
||||
}
|
||||
} else {
|
||||
self.groundentity = __NULL__;
|
||||
}
|
||||
|
||||
self.flags &= ~FL_WATERJUMP;
|
||||
|
@ -460,7 +462,6 @@ PMoveCustom_Move(void)
|
|||
if (!(self.flags & FL_ONGROUND)) {
|
||||
self.basevelocity[2] = 0;
|
||||
}
|
||||
self.velocity += self.basevelocity;
|
||||
|
||||
/* we need to bounce off surfaces (in order to slide along them),
|
||||
* so we need at 2 attempts */
|
||||
|
@ -501,7 +502,7 @@ PMoveCustom_Move(void)
|
|||
float roof_fraction = trace_fraction;
|
||||
vector roof_plane_normal = trace_plane_normal;
|
||||
|
||||
dest = trace_endpos + self.velocity*move_time;
|
||||
dest = trace_endpos + (self.velocity*move_time);
|
||||
dest[2] = trace_endpos[2]; /*only horizontally*/
|
||||
|
||||
/* move forwards */
|
||||
|
@ -556,9 +557,6 @@ PMoveCustom_Move(void)
|
|||
self.groundentity = trace_ent;
|
||||
}
|
||||
|
||||
/* make sure that the basevelocity we've applied is discarded by next frame */
|
||||
self.velocity -= self.basevelocity;
|
||||
|
||||
tracebox(self.origin, self.mins, self.maxs, self.origin, MOVE_NORMAL, self);
|
||||
}
|
||||
|
||||
|
@ -588,7 +586,6 @@ PMoveCustom_RunPlayerPhysics(entity target)
|
|||
|
||||
/* clear base-velocity and ground-entity */
|
||||
self.basevelocity = [0,0,0];
|
||||
self.groundentity = __NULL__;
|
||||
|
||||
/* activate any SOLID_TRIGGER entities */
|
||||
touchtriggers();
|
||||
|
|
Loading…
Reference in a new issue