From 31ecb677a40f06e0959960389a8035729e5cbd38 Mon Sep 17 00:00:00 2001 From: Anton Burmistrov Date: Tue, 15 Oct 2019 12:49:57 +0300 Subject: [PATCH] Running/crouching while swimming will result in faster/slower swim speed (#34770) * Running movement mode while swimming means faster swim speed * Swimming speed is now based on movement mode --- src/player.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/player.cpp b/src/player.cpp index 7b954431b2424..34d56347b31e7 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -1768,6 +1768,16 @@ int player::swim_speed() const if( underwater && ret < 500 ) { ret -= 50; } + + // Running movement mode while swimming means faster swim style, like crawlstroke + if( move_mode == PMM_RUN ) { + ret -= 80; + } + // Crouching movement mode while swimming means slower swim style, like breaststroke + if( move_mode == PMM_CROUCH ) { + ret += 50; + } + if( ret < 30 ) { ret = 30; }