commit
77a6b59bca
|
@ -244,9 +244,9 @@ NSClientPlayer::Physics_WaterMove(void)
|
|||
/* we've just exited water */
|
||||
if (WaterLevel() != 3) {
|
||||
if (m_flUnderwaterTime < time) {
|
||||
Sound_Play(this, CHAN_BODY, "player.gasplight");
|
||||
} else if (m_flUnderwaterTime < time + 9) {
|
||||
Sound_Play(this, CHAN_BODY, "player.gaspheavy");
|
||||
} else if (m_flUnderwaterTime < time + 9) {
|
||||
Sound_Play(this, CHAN_BODY, "player.gasplight");
|
||||
}
|
||||
m_flUnderwaterTime = time + 12;
|
||||
} else if (m_flUnderwaterTime < time) {
|
||||
|
@ -299,7 +299,9 @@ NSClientPlayer::Physics_WaterMove(void)
|
|||
float
|
||||
NSClientPlayer::Physics_MaxSpeed(void)
|
||||
{
|
||||
return (GetFlags() & FL_CROUCHING) ? 135 : 270;
|
||||
float maxspeed = serverkeyfloat("phy_maxspeed");
|
||||
float desiredspeed = (GetFlags() & FL_CROUCHING) ? PMOVE_STEP_WALKSPEED : maxspeed;
|
||||
return min(desiredspeed, maxspeed);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -241,6 +241,10 @@ PMoveCustom_AccelFriction(float move_time, float premove, vector wish_dir, float
|
|||
vecTemp[2] = 0;
|
||||
flFriction = vlen(vecTemp);
|
||||
|
||||
/* Next few lines of code assumes self is using player's hull, however it could be a monster
|
||||
who use differen hull size, therefore it is invalid, so we probably better of using mins/maxs,
|
||||
on the other hand edge friction is probably not that important. */
|
||||
|
||||
// if the leading edge is over a dropoff, increase friction
|
||||
vecTemp = self.origin + normalize(vecTemp) * 16 + [0,0,1] * PHY_HULL_MIN[2];
|
||||
traceline(vecTemp, vecTemp + [0,0,-34], TRUE, self);
|
||||
|
@ -592,6 +596,7 @@ PMoveCustom_RunPlayerPhysics(entity target)
|
|||
self = oldself;
|
||||
}
|
||||
|
||||
/* Next code assumes self is using player's hull, so it should not be used for monsters who use different hull size. */
|
||||
void
|
||||
PMoveCustom_RunCrouchPhysics(entity target)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue