diff --git a/config/docs.cfg b/config/docs.cfg index 74ba36de..e44fe4ac 100644 --- a/config/docs.cfg +++ b/config/docs.cfg @@ -907,6 +907,8 @@ docident [old_editbinds] [Enables or disables the old editing binds.]; docexample [old_editbinds = 0] [disables the old editing binds]; docexample [old_editbinds = 1] [enables the old editing binds]; docremark [If disabled, an updated editing binds system is used, see the comments in "/config/resetbinds.cfg" for more info.]; +docident [slowmove] [Enables or disables the old editfly velocity.]; +docargument [N] [enable or disable] [min 0/max 1/default 0] [0]; docsection [Menus] docident [chmenumdl] [Changes the menu model of a specified menu.]; docargument [N] [the name of the menu] [] [0]; diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index 270fcf68..d61964a8 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -4,7 +4,7 @@ // Do not modify. bind MOUSE1 "attack" -bind MOUSE2 [ if $editing [ showmenu editing ] [ altaction ] ] +bind MOUSE2 [ if $old_editbinds [ if $editing [ showmenu editing ] [ altaction ] ] [ if $editing [ slowmove 1; onrelease slowmove 0 ] [ altaction ] ] ] bind MOUSE3 "weapon" bind MOUSE4 "universaldelta 1" bind MOUSE5 "universaldelta -1" diff --git a/docs/reference.xml b/docs/reference.xml index 6bb87f46..4afea502 100644 --- a/docs/reference.xml +++ b/docs/reference.xml @@ -3549,6 +3549,11 @@ Output: If this alias exists, it will be automatically executed when you start a new map. + + + Enables or disables the old editfly velocity. + + diff --git a/source/src/physics.cpp b/source/src/physics.cpp index 095e8253..f99da7ec 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -373,7 +373,7 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime) if(!(pl->onfloor || pl->onladder)) chspeed = 1.0f; const bool crouching = pl->crouching || pl->eyeheight < pl->maxeyeheight; - const float speed = curtime/(water ? 2000.0f : 1000.0f)*pl->maxspeed*(crouching ? chspeed : 1.0f)*(isfly ? 2.0f : 1.0f); + const float speed = curtime/(water ? 2000.0f : 1000.0f)*pl->maxspeed*(crouching ? chspeed : 1.0f)*(isfly && !slowmove ? 2.0f : 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);