fix flyspeed

and a compiler optimisation error

(for clang >= 4, O3 may be reactivated in the makefile)
This commit is contained in:
ac-stef
2016-09-09 22:22:55 +02:00
parent 588e9f9de8
commit 29a3970b72
3 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -457,7 +457,7 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
float chspeed = (pl->onfloor || pl->onladder || !pl->crouchedinair) ? 0.4f : 1.0f;
const bool crouching = pl->crouching || pl->eyeheight < pl->maxeyeheight;
const bool crouching = pl->crouching || (pl->eyeheight < pl->maxeyeheight && pl->eyeheight > 1.1f);
const float speed = curtime/(water ? 2000.0f : 1000.0f)*pl->maxspeed*(crouching && pl->state != CS_EDITING ? chspeed : 1.0f)*(pl==player1 && isfly ? flyspeed : 1.0f);
const float friction = water ? 20.0f : (pl->onfloor || isfly ? 6.0f : (pl->onladder ? 1.5f : 30.0f));
const float fpsfric = max(friction/curtime*20.0f, 1.0f);