From: havoc Date: Fri, 2 Mar 2007 13:05:39 +0000 (+0000) Subject: fix really stupid bug introduced in sv_user.c revision 1.83 (sv_waterfriction was... X-Git-Tag: xonotic-v0.1.0preview~3486 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=70d8c747544b3a00bfbd026df24b2bff004aa329;p=xonotic%2Fdarkplaces.git fix really stupid bug introduced in sv_user.c revision 1.83 (sv_waterfriction was being used, even if it's -1 which means use sv_friction instead), now properly uses sv_friction if sv_waterfriction < 0 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6930 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_user.c b/sv_user.c index 8ce2181d..ce1fcf17 100644 --- a/sv_user.c +++ b/sv_user.c @@ -277,7 +277,7 @@ void SV_WaterMove (void) speed = VectorLength(host_client->edict->fields.server->velocity); if (speed) { - newspeed = speed - sv.frametime * speed * sv_waterfriction.value; + newspeed = speed - sv.frametime * speed * (sv_waterfriction.value < 0 ? sv_friction.value : sv_waterfriction.value); if (newspeed < 0) newspeed = 0; temp = newspeed/speed;