mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Merge pull request #1514 from Azaezel/alpha41/stepLively
further filtering for updatePlayerAttachment
This commit is contained in:
commit
aa918b0e7e
1 changed files with 4 additions and 2 deletions
|
|
@ -4754,6 +4754,8 @@ bool Player::step(Point3F *pos,F32 *maxStep,F32 time)
|
||||||
// If so, it will attempt to attach to it.
|
// If so, it will attempt to attach to it.
|
||||||
void Player::updateAttachment()
|
void Player::updateAttachment()
|
||||||
{
|
{
|
||||||
|
if (getDamageState() != Enabled && mVelocity.z > mDataBlock->fallingSpeedThreshold) return;
|
||||||
|
|
||||||
Point3F rot, pos;
|
Point3F rot, pos;
|
||||||
RayInfo rInfo;
|
RayInfo rInfo;
|
||||||
MatrixF mat = getTransform();
|
MatrixF mat = getTransform();
|
||||||
|
|
@ -4761,10 +4763,10 @@ void Player::updateAttachment()
|
||||||
disableCollision();
|
disableCollision();
|
||||||
if (gServerContainer.castRay(Point3F(pos.x, pos.y, pos.z + 0.1f),
|
if (gServerContainer.castRay(Point3F(pos.x, pos.y, pos.z + 0.1f),
|
||||||
Point3F(pos.x, pos.y, pos.z - 1.0f ),
|
Point3F(pos.x, pos.y, pos.z - 1.0f ),
|
||||||
sCollisionMoveMask, &rInfo))
|
PathShapeObjectType | StaticShapeObjectType | TerrainObjectType, &rInfo))
|
||||||
{
|
{
|
||||||
Point3F setPos = rInfo.point;
|
Point3F setPos = rInfo.point;
|
||||||
setPos.z = mMax(setPos.z+sMinFaceDistance, pos.z);
|
setPos.z = mMax(setPos.z + sMinFaceDistance, pos.z);
|
||||||
|
|
||||||
if ((mJumpSurfaceLastContact < JumpSkipContactsMax) && !mSwimming)
|
if ((mJumpSurfaceLastContact < JumpSkipContactsMax) && !mSwimming)
|
||||||
setPosition(setPos, getRotation());
|
setPosition(setPos, getRotation());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue