From 1b6a0a5f74e42cd508599b5f6b5211faac14b21f Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Sat, 5 Jul 2025 18:01:01 -0500 Subject: [PATCH] further filtering for updatePlayerAttachment *just* check pathshape/staticshape/terrain for determining if we are attaching/detaching from a pathshape and don't bother if we're not enabled and not falling --- Engine/source/T3D/player.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Engine/source/T3D/player.cpp b/Engine/source/T3D/player.cpp index 4453dd8bf..4cd4e4f86 100644 --- a/Engine/source/T3D/player.cpp +++ b/Engine/source/T3D/player.cpp @@ -4754,6 +4754,8 @@ bool Player::step(Point3F *pos,F32 *maxStep,F32 time) // If so, it will attempt to attach to it. void Player::updateAttachment() { + if (getDamageState() != Enabled && mVelocity.z > mDataBlock->fallingSpeedThreshold) return; + Point3F rot, pos; RayInfo rInfo; MatrixF mat = getTransform(); @@ -4761,10 +4763,10 @@ void Player::updateAttachment() disableCollision(); if (gServerContainer.castRay(Point3F(pos.x, pos.y, pos.z + 0.1f), Point3F(pos.x, pos.y, pos.z - 1.0f ), - sCollisionMoveMask, &rInfo)) + PathShapeObjectType | StaticShapeObjectType | TerrainObjectType, &rInfo)) { Point3F setPos = rInfo.point; - setPos.z = mMax(setPos.z+sMinFaceDistance, pos.z); + setPos.z = mMax(setPos.z + sMinFaceDistance, pos.z); if ((mJumpSurfaceLastContact < JumpSkipContactsMax) && !mSwimming) setPosition(setPos, getRotation());