Snap player to terrain after loading to prevent spawning underground

This commit is contained in:
Kelsi 2026-02-07 13:50:30 -08:00
parent dfc4008ec7
commit 0ae38a59c8
2 changed files with 5 additions and 1 deletions

View file

@ -1586,7 +1586,6 @@ bool WMORenderer::checkWallCollision(const glm::vec3& from, const glm::vec3& to,
float triMaxZ = std::max({v0.z, v1.z, v2.z});
float fromDist = glm::dot(localFrom - v0, normal);
float toDist = glm::dot(localTo - v0, normal);
bool towardWallMotion = (std::abs(toDist) + 1e-4f < std::abs(fromDist));
// Only collide with walls in player's vertical range
if (triMaxZ < localFeetZ + 0.3f) continue;