From f96aab2186d17ddd286fa42913f3f14e9562c4eb Mon Sep 17 00:00:00 2001 From: Giacomo Pozzoni Date: Sun, 21 Feb 2021 17:29:09 +0100 Subject: Core/Maps: Use a fixed offset instead of full collision height when retrieving floor Z (#26092) Use a fixed offset 0.5f instead of full collision height when retrieving floor Z as a full collision height ended up on the floor above a few times. It makes more sense to cast the ray just a bit higher up than using a full collision height (which by default is 2.0f) --- src/server/shared/SharedDefines.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/server/shared') diff --git a/src/server/shared/SharedDefines.h b/src/server/shared/SharedDefines.h index 66da2884e7f..63202d294fb 100644 --- a/src/server/shared/SharedDefines.h +++ b/src/server/shared/SharedDefines.h @@ -24,6 +24,7 @@ #include "SmartEnum.h" float const GROUND_HEIGHT_TOLERANCE = 0.05f; // Extra tolerance to z position to check if it is in air or on ground. +constexpr float Z_OFFSET_FIND_HEIGHT = 0.5f; enum SpellEffIndex : uint8 { -- cgit v1.2.3