mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-20 12:36:05 +08:00
Added most recent version of unmodified HL2 SDK for Episode 1 engine
This commit is contained in:
53
cl_dll/sdk/sdk_prediction.cpp
Normal file
53
cl_dll/sdk/sdk_prediction.cpp
Normal file
@ -0,0 +1,53 @@
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#include "cbase.h"
|
||||
#include "prediction.h"
|
||||
#include "c_baseplayer.h"
|
||||
#include "igamemovement.h"
|
||||
|
||||
|
||||
static CMoveData g_MoveData;
|
||||
CMoveData *g_pMoveData = &g_MoveData;
|
||||
|
||||
|
||||
class CSDKPrediction : public CPrediction
|
||||
{
|
||||
DECLARE_CLASS( CSDKPrediction, CPrediction );
|
||||
|
||||
public:
|
||||
virtual void SetupMove( C_BasePlayer *player, CUserCmd *ucmd, IMoveHelper *pHelper, CMoveData *move );
|
||||
virtual void FinishMove( C_BasePlayer *player, CUserCmd *ucmd, CMoveData *move );
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CSDKPrediction::SetupMove( C_BasePlayer *player, CUserCmd *ucmd, IMoveHelper *pHelper,
|
||||
CMoveData *move )
|
||||
{
|
||||
// Call the default SetupMove code.
|
||||
BaseClass::SetupMove( player, ucmd, pHelper, move );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
void CSDKPrediction::FinishMove( C_BasePlayer *player, CUserCmd *ucmd, CMoveData *move )
|
||||
{
|
||||
// Call the default FinishMove code.
|
||||
BaseClass::FinishMove( player, ucmd, move );
|
||||
}
|
||||
|
||||
|
||||
// Expose interface to engine
|
||||
// Expose interface to engine
|
||||
static CSDKPrediction g_Prediction;
|
||||
|
||||
EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CSDKPrediction, IPrediction, VCLIENT_PREDICTION_INTERFACE_VERSION, g_Prediction );
|
||||
|
||||
CPrediction *prediction = &g_Prediction;
|
||||
|
Reference in New Issue
Block a user