From 1a84ab6983d038f92b547c5b5b1026190adbc2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Mauger?= Date: Sat, 23 Sep 2023 20:49:20 +0200 Subject: [PATCH] fix(Core/Unit): Fix CanSwim method not accurate for players (#17320) --- src/server/game/Entities/Unit/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a42fb492d..b95b31962 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -20224,7 +20224,7 @@ bool Unit::CanSwim() const // Mirror client behavior, if this method returns false then client will not use swimming animation and for players will apply gravity as if there was no water if (HasUnitFlag(UNIT_FLAG_CANNOT_SWIM)) return false; - if (HasUnitFlag(UNIT_FLAG_POSSESSED)) // is player + if (HasUnitFlag(UNIT_FLAG_POSSESSED) || HasUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED)) // is player return true; if (HasUnitFlag2(UNIT_FLAG2_UNUSED_6)) return false;