PMove: Fix not working when not setting #ifdef CUSTOMPLAYERPHYSICS
This commit is contained in:
parent
90685f2495
commit
66945575ae
1 changed files with 9 additions and 2 deletions
|
@ -603,6 +603,7 @@ PMoveCustom_Move(void)
|
|||
self.groundentity = trace_ent;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* this is called for when we want to run the custom QC player physics */
|
||||
void
|
||||
|
@ -617,19 +618,26 @@ PMoveCustom_RunPlayerPhysics(entity target)
|
|||
if (self.maxspeed <= 0)
|
||||
self.maxspeed = 240;
|
||||
|
||||
#ifdef CUSTOMPLAYERPHYSICS
|
||||
/* call accelerate before and after the actual move,
|
||||
* with half the move each time. this reduces framerate dependence.
|
||||
* and makes controlling jumps slightly easier */
|
||||
PMoveCustom_Acceleration(input_timelength / 2, TRUE);
|
||||
PMoveCustom_Move();
|
||||
PMoveCustom_Acceleration(input_timelength / 2, FALSE);
|
||||
#else
|
||||
runstandardplayerphysics(target);
|
||||
#endif
|
||||
|
||||
/* NOTE: should clip to network precision here if lower than a float */
|
||||
self.angles = input_angles;
|
||||
self.angles[0] *= -0.333;
|
||||
|
||||
#ifdef CUSTOMPLAYERPHYSICS
|
||||
/* activate any SOLID_TRIGGER entities */
|
||||
touchtriggers();
|
||||
#endif
|
||||
|
||||
setorigin(self, self.origin);
|
||||
self = oldself;
|
||||
}
|
||||
|
@ -673,5 +681,4 @@ PMoveCustom_RunCrouchPhysics(entity target)
|
|||
target.view_ofs = PHY_VIEWPOS;
|
||||
}
|
||||
PMoveCustom_RunPlayerPhysics(target);
|
||||
}
|
||||
#endif
|
||||
}
|
Loading…
Reference in a new issue