bool CSDKPlayerShared::CanRoll() const { if (m_pOuter->GetLocalVelocity().Length2D() < 10) return false; if (IsProne() && m_pOuter->GetCurrentTime() - m_flDiveToProneLandTime > da_d2p_stunt_forgiveness.GetFloat()) return false; if (IsSliding()) return false; if (IsRolling()) return false; if (IsDiving()) return false; if (!CanChangePosition()) return false; if (!(m_pOuter->GetFlags() & FL_ONGROUND)) return false; return true; }
bool CSDKPlayerShared::CanDive() const { if (m_pOuter->GetLocalVelocity().Length2D() < 10) return false; if (IsProne()) return false; if (IsSliding()) return false; if (IsRolling()) return false; if (IsDucking()) return false; if (IsDiving()) return false; if (!CanChangePosition()) return false; if (m_pOuter->GetCurrentTime() - m_flTimeLeftGround > 2) return false; return true; }
void CDODPlayerShared::ComputeWorldSpaceSurroundingBox( Vector *pVecWorldMins, Vector *pVecWorldMaxs ) { Vector org = m_pOuter->GetAbsOrigin(); if ( IsProne() ) { static Vector vecProneMin(-44, -44, 0 ); static Vector vecProneMax(44, 44, 24 ); VectorAdd( vecProneMin, org, *pVecWorldMins ); VectorAdd( vecProneMax, org, *pVecWorldMaxs ); } else { static Vector vecMin(-32, -32, 0 ); static Vector vecMax(32, 32, 72 ); VectorAdd( vecMin, org, *pVecWorldMins ); VectorAdd( vecMax, org, *pVecWorldMaxs ); } }
bool CDODPlayerShared::IsSandbagDeployed( void ) const { return ( !IsProne() && IsInMGDeploy() ); }