diff --git a/config/docs.cfg b/config/docs.cfg index a72f8111..38586c2f 100644 --- a/config/docs.cfg +++ b/config/docs.cfg @@ -974,8 +974,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] [0 off, 1 on] [min 0/max 1/default 0] [0]; +docident [flyspeed] [Determines by how much to multiply the fly speeds by.]; +docargument [N] [the multiplicand] [min 1.0/max 5.0/default 2.0] [0]; docident [oldselstyle] [Enables or disables using triangles to render the editing grid/current selection instead of squares.]; docargument [N] [0 off, 1 on] [min 0/max 1/default 1] [0]; docsection [Menus] diff --git a/config/scripts.cfg b/config/scripts.cfg index cce29c6d..3a6de5d3 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -375,7 +375,7 @@ cleanshot = [ ] // Slowtoggle - Meant to be keybound, quickly toggle from fast/slow fly speeds. -slowtoggle = [ if (!= $arg1 0) [ slowmove 0; onrelease [ slowmove 1 ] ] [ slowmove 1; onrelease [ slowmove 0 ] ] ] +slowtoggle = [ if (!= $arg1 0) [ flyspeed 2.0; onrelease [ flyspeed 1.0 ] ] [ flyspeed 1.0; onrelease [ flyspeed 2.0 ] ] ] votepending = 0 if (! (checkalias onCallVote)) [ onCallVote = "" ]; if (! (strstr $onCallVote votepending)) [ add2alias onCallVote [ votepending = 1 ] ] diff --git a/docs/reference.xml b/docs/reference.xml index f9ad8e0a..ccd3f298 100644 --- a/docs/reference.xml +++ b/docs/reference.xml @@ -3943,9 +3943,9 @@ Output: If this alias exists, it will be automatically executed when you start a new map. - - Enables or disables the old editfly velocity. - + + Determines by how much to multiply the fly speeds by. + diff --git a/source/src/physics.cpp b/source/src/physics.cpp index 80e14d3c..aae88652 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -321,7 +321,7 @@ float var_f = 0; int var_i = 0; bool var_b = true; -VARP(slowmove, 0, 0, 1); +FVARP(flyspeed, 1.0, 2.0, 5.0); void moveplayer(physent *pl, int moveres, bool local, int curtime) { @@ -375,7 +375,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 && pl->state != CS_EDITING ? chspeed : 1.0f)*(pl==player1 && isfly && !slowmove ? 2.0f : 1.0f); + 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);