2023-01-19 19:39:15 +01:00
|
|
|
|
//====== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. =======//
|
|
|
|
|
//
|
|
|
|
|
// Purpose:
|
|
|
|
|
//
|
|
|
|
|
// $NoKeywords: $
|
|
|
|
|
//=============================================================================//
|
|
|
|
|
|
|
|
|
|
#ifndef MOVEHELPER_CLIENT_H
|
|
|
|
|
#define MOVEHELPER_CLIENT_H
|
|
|
|
|
#include "tier1/utlvector.h"
|
2023-01-20 17:21:34 +01:00
|
|
|
|
#include "public/gametrace.h"
|
|
|
|
|
#include "game/shared/imovehelper.h"
|
2023-01-24 18:39:12 +01:00
|
|
|
|
#include "c_baseplayer.h"
|
2023-01-19 19:39:15 +01:00
|
|
|
|
|
|
|
|
|
class CMoveHelperClient : public IMoveHelper
|
|
|
|
|
{
|
|
|
|
|
// results, tallied on client and server, but only used by server to run SV_Impact.
|
|
|
|
|
// we store off our velocity in the trace_t structure so that we can determine results
|
|
|
|
|
// of shoving boxes etc. around.
|
|
|
|
|
struct touchlist_t
|
|
|
|
|
{
|
|
|
|
|
Vector3D deltavelocity;
|
2023-01-20 17:21:34 +01:00
|
|
|
|
trace_t trace;
|
2023-01-19 19:39:15 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
CUtlVector<touchlist_t> m_TouchList;
|
2023-01-24 18:39:12 +01:00
|
|
|
|
C_BaseEntity* m_pHost;
|
2023-01-19 19:39:15 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
IMoveHelper* MoveHelperClient();
|
|
|
|
|
extern CMoveHelperClient* s_MoveHelperClient;
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
class VMoveHelperClient : public IDetour
|
|
|
|
|
{
|
|
|
|
|
virtual void GetAdr(void) const
|
|
|
|
|
{
|
2023-01-25 02:26:52 +01:00
|
|
|
|
LogVarAdr("s_MoveHelperClient", reinterpret_cast<uintptr_t>(s_MoveHelperClient));
|
2023-01-19 19:39:15 +01:00
|
|
|
|
}
|
|
|
|
|
virtual void GetFun(void) const { }
|
|
|
|
|
virtual void GetVar(void) const
|
|
|
|
|
{
|
|
|
|
|
CMemory pFunc = g_GameDll.FindPatternSIMD("40 53 48 83 EC 30 80 3D ?? ?? ?? ?? ?? 48 8B D9 74 1A");
|
|
|
|
|
s_MoveHelperClient = pFunc.FindPattern("4C 8D 0D").ResolveRelativeAddressSelf(0x3, 0x7).RCast<CMoveHelperClient*>();
|
|
|
|
|
}
|
|
|
|
|
virtual void GetCon(void) const { }
|
|
|
|
|
virtual void Attach(void) const { }
|
|
|
|
|
virtual void Detach(void) const { }
|
|
|
|
|
};
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#endif // MOVEHELPER_CLIENT_H
|