mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-03-14 23:12:41 +00:00
pmove: PM_Friction cleanup
This commit is contained in:
parent
e71fce25a4
commit
5440d6b94a
1 changed files with 4 additions and 3 deletions
|
@ -295,7 +295,7 @@ PM_Friction(void)
|
|||
|
||||
vel = pml.velocity;
|
||||
|
||||
speed = (float)sqrt(vel[0] * vel[0] + vel[1] * vel[1] + vel[2] * vel[2]);
|
||||
speed = VectorLength(vel);
|
||||
|
||||
if (speed < 1)
|
||||
{
|
||||
|
@ -336,8 +336,9 @@ PM_Friction(void)
|
|||
vel[2] = vel[2] * newspeed;
|
||||
}
|
||||
|
||||
//Used for speedoomter display.
|
||||
void GetPlayerSpeed(float* speed, float* speedxy) {
|
||||
/* Used for speedoomter display. */
|
||||
void GetPlayerSpeed(float *speed, float *speedxy)
|
||||
{
|
||||
*speedxy = sqrt(pml.velocity[0] * pml.velocity[0] + pml.velocity[1] * pml.velocity[1]);
|
||||
*speed = VectorLength(pml.velocity);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue