fix really stupid bug introduced in sv_user.c revision 1.83 (sv_waterfriction was...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 2 Mar 2007 13:05:39 +0000 (13:05 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 2 Mar 2007 13:05:39 +0000 (13:05 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6930 d7cf8633-e32d-0410-b094-e92efae38249

sv_user.c

index 8ce2181..ce1fcf1 100644 (file)
--- 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;