summaryrefslogtreecommitdiff
path: root/game/shared/tf2/tf_gamemovement_escort.cpp
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/shared/tf2/tf_gamemovement_escort.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/tf2/tf_gamemovement_escort.cpp')
-rw-r--r--game/shared/tf2/tf_gamemovement_escort.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/game/shared/tf2/tf_gamemovement_escort.cpp b/game/shared/tf2/tf_gamemovement_escort.cpp
new file mode 100644
index 0000000..7ce0c48
--- /dev/null
+++ b/game/shared/tf2/tf_gamemovement_escort.cpp
@@ -0,0 +1,65 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Auto Repair
+//
+// $NoKeywords: $
+//=============================================================================//
+#include "cbase.h"
+#include "tf_gamemovement_escort.h"
+#include "tf_movedata.h"
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+CTFGameMovementEscort::CTFGameMovementEscort()
+{
+ m_pEscortData = NULL;
+
+ m_vStandMins = ESCORTCLASS_HULL_STAND_MIN;
+ m_vStandMaxs = ESCORTCLASS_HULL_STAND_MAX;
+ m_vStandViewOffset = ESCORTCLASS_VIEWOFFSET_STAND;
+
+ m_vDuckMins = ESCORTCLASS_HULL_DUCK_MIN;
+ m_vDuckMaxs = ESCORTCLASS_HULL_DUCK_MAX;
+ m_vDuckViewOffset = ESCORTCLASS_VIEWOFFSET_DUCK;
+}
+
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void CTFGameMovementEscort::ProcessClassMovement( CBaseTFPlayer *pPlayer, CTFMoveData *pTFMoveData )
+{
+ // Get the class specific data from the TFMoveData structure
+ Assert( PlayerClassEscortData_t::PLAYERCLASS_ID == pTFMoveData->m_nClassID );
+ m_pEscortData = &pTFMoveData->EscortData();
+
+ // to test pass it through!!
+ BaseClass::ProcessMovement( (CBasePlayer *)pPlayer, static_cast<CMoveData*>( pTFMoveData ) );
+}
+
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+const Vector &CTFGameMovementEscort::GetPlayerMins( bool bDucked ) const
+{
+ return bDucked ? m_vDuckMins : m_vStandMins;
+}
+
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+const Vector &CTFGameMovementEscort::GetPlayerMaxs( bool bDucked ) const
+{
+ return bDucked ? m_vDuckMaxs : m_vStandMaxs;
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+const Vector &CTFGameMovementEscort::GetPlayerViewOffset( bool bDucked ) const
+{
+ return bDucked ? m_vDuckViewOffset : m_vStandViewOffset;
+}