MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / canProne

Method canProne

Engine/source/T3D/player.cpp:3475–3500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3473}
3474
3475bool Player::canProne()
3476{
3477 if (!mAllowProne)
3478 return false;
3479
3480 if ( mState != MoveState ||
3481 mDamageState != Enabled ||
3482 isMounted() ||
3483 mSwimming ||
3484 mFalling )
3485 return false;
3486
3487 // Can't go prone if no prone animation!
3488 if ( mDataBlock->actionList[PlayerData::ProneRootAnim].sequence == -1 )
3489 return false;
3490
3491 // Do standard Torque physics test here!
3492 if ( !mPhysicsRep )
3493 return true;
3494
3495 // We are already in this pose, so don't test it again...
3496 if ( mPose == PronePose )
3497 return true;
3498
3499 return mPhysicsRep->testSpacials( getPosition(), mDataBlock->proneBoxSize );
3500}
3501
3502bool Player::canSprint()
3503{

Callers

nothing calls this directly

Calls 2

getPositionFunction · 0.85
testSpacialsMethod · 0.45

Tested by

no test coverage detected