You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.2 KiB
64 lines
2.2 KiB
5 years ago
|
//========= 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;
|
||
|
}
|
||
|
|