diff options
Diffstat (limited to 'game/shared/tf2/tf_gamemovement_pyro.cpp')
| -rw-r--r-- | game/shared/tf2/tf_gamemovement_pyro.cpp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/game/shared/tf2/tf_gamemovement_pyro.cpp b/game/shared/tf2/tf_gamemovement_pyro.cpp new file mode 100644 index 0000000..8bbc2d8 --- /dev/null +++ b/game/shared/tf2/tf_gamemovement_pyro.cpp @@ -0,0 +1,63 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Auto Repair +// +// $NoKeywords: $ +//=============================================================================// +#include "cbase.h" +#include "tf_gamemovement_pyro.h" +#include "tf_movedata.h" + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +CTFGameMovementPyro::CTFGameMovementPyro() +{ + m_pPyroData = NULL; + + m_vStandMins = PYROCLASS_HULL_STAND_MIN; + m_vStandMaxs = PYROCLASS_HULL_STAND_MAX; + m_vStandViewOffset = PYROCLASS_VIEWOFFSET_STAND; + + m_vDuckMins = PYROCLASS_HULL_DUCK_MIN; + m_vDuckMaxs = PYROCLASS_HULL_DUCK_MAX; + m_vDuckViewOffset = PYROCLASS_VIEWOFFSET_DUCK; +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void CTFGameMovementPyro::ProcessClassMovement( CBaseTFPlayer *pPlayer, CTFMoveData *pTFMoveData ) +{ + // Get the class specific data from the TFMoveData structure + Assert( PlayerClassPyroData_t::PLAYERCLASS_ID == pTFMoveData->m_nClassID ); + m_pPyroData = &pTFMoveData->PyroData(); + + // to test pass it through!! + BaseClass::ProcessMovement( (CBasePlayer *)pPlayer, static_cast<CMoveData*>( pTFMoveData ) ); +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +const Vector &CTFGameMovementPyro::GetPlayerMins( bool bDucked ) const +{ + return bDucked ? m_vDuckMins : m_vStandMins; +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +const Vector &CTFGameMovementPyro::GetPlayerMaxs( bool bDucked ) const +{ + return bDucked ? m_vDuckMaxs : m_vStandMaxs; +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +const Vector &CTFGameMovementPyro::GetPlayerViewOffset( bool bDucked ) const +{ + return bDucked ? m_vDuckViewOffset : m_vStandViewOffset; +} + |