mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Add client movehelper to SDK
Structure and vftable align 100%.
This commit is contained in:
parent
7279039226
commit
05748e6184
18
r5dev/game/client/movehelper_client.cpp
Normal file
18
r5dev/game/client/movehelper_client.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
//====== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. =======//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#include "core/stdafx.h"
|
||||
#include "movehelper_client.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Gets the client movehelper
|
||||
//-----------------------------------------------------------------------------
|
||||
IMoveHelper* MoveHelperClient()
|
||||
{
|
||||
return s_MoveHelperClient;
|
||||
}
|
||||
|
||||
CMoveHelperClient* s_MoveHelperClient = nullptr;
|
53
r5dev/game/client/movehelper_client.h
Normal file
53
r5dev/game/client/movehelper_client.h
Normal file
@ -0,0 +1,53 @@
|
||||
//====== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. =======//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef MOVEHELPER_CLIENT_H
|
||||
#define MOVEHELPER_CLIENT_H
|
||||
#include "game/shared/imovehelper.h"
|
||||
#include "tier1/utlvector.h"
|
||||
|
||||
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;
|
||||
//trace_t trace; // !TODO: Reverse CGameTrace!
|
||||
};
|
||||
|
||||
CUtlVector<touchlist_t> m_TouchList;
|
||||
CBaseEntity* m_pHost;
|
||||
};
|
||||
|
||||
IMoveHelper* MoveHelperClient();
|
||||
extern CMoveHelperClient* s_MoveHelperClient;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class VMoveHelperClient : public IDetour
|
||||
{
|
||||
virtual void GetAdr(void) const
|
||||
{
|
||||
spdlog::debug("| VAR: s_MoveHelperClient : {:#18x} |\n", reinterpret_cast<uintptr_t>(s_MoveHelperClient));
|
||||
spdlog::debug("+----------------------------------------------------------------+\n");
|
||||
}
|
||||
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 { }
|
||||
};
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
REGISTER(VMoveHelperClient);
|
||||
|
||||
#endif // MOVEHELPER_CLIENT_H
|
@ -60,6 +60,7 @@
|
||||
<ClCompile Include="..\gameui\IConsole.cpp" />
|
||||
<ClCompile Include="..\gameui\IBrowser.cpp" />
|
||||
<ClCompile Include="..\game\client\c_baseentity.cpp" />
|
||||
<ClCompile Include="..\game\client\movehelper_client.cpp" />
|
||||
<ClCompile Include="..\game\client\spritemodel.cpp" />
|
||||
<ClCompile Include="..\game\client\viewrender.cpp" />
|
||||
<ClCompile Include="..\game\shared\animation.cpp" />
|
||||
@ -231,6 +232,7 @@
|
||||
<ClInclude Include="..\game\client\c_baseplayer.h" />
|
||||
<ClInclude Include="..\game\client\enginesprite.h" />
|
||||
<ClInclude Include="..\game\client\hud.h" />
|
||||
<ClInclude Include="..\game\client\movehelper_client.h" />
|
||||
<ClInclude Include="..\game\client\viewrender.h" />
|
||||
<ClInclude Include="..\game\shared\animation.h" />
|
||||
<ClInclude Include="..\game\shared\collisionproperty.h" />
|
||||
|
@ -660,6 +660,9 @@
|
||||
<ClCompile Include="..\game\shared\entitylist_base.cpp">
|
||||
<Filter>sdk\game\shared</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\game\client\movehelper_client.cpp">
|
||||
<Filter>sdk\game\client</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\client\cdll_engine_int.h">
|
||||
@ -1937,6 +1940,9 @@
|
||||
<ClInclude Include="..\game\shared\imovehelper.h">
|
||||
<Filter>sdk\game\shared</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\game\client\movehelper_client.h">
|
||||
<Filter>sdk\game\client</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\shared\resource\lockedserver.png">
|
||||
|
@ -63,6 +63,7 @@
|
||||
<ClCompile Include="..\gameui\IConsole.cpp" />
|
||||
<ClCompile Include="..\gameui\IBrowser.cpp" />
|
||||
<ClCompile Include="..\game\client\c_baseentity.cpp" />
|
||||
<ClCompile Include="..\game\client\movehelper_client.cpp" />
|
||||
<ClCompile Include="..\game\client\spritemodel.cpp" />
|
||||
<ClCompile Include="..\game\client\viewrender.cpp" />
|
||||
<ClCompile Include="..\game\server\ai_network.cpp" />
|
||||
@ -250,6 +251,7 @@
|
||||
<ClInclude Include="..\game\client\c_baseplayer.h" />
|
||||
<ClInclude Include="..\game\client\enginesprite.h" />
|
||||
<ClInclude Include="..\game\client\hud.h" />
|
||||
<ClInclude Include="..\game\client\movehelper_client.h" />
|
||||
<ClInclude Include="..\game\client\viewrender.h" />
|
||||
<ClInclude Include="..\game\server\ai_network.h" />
|
||||
<ClInclude Include="..\game\server\ai_networkmanager.h" />
|
||||
|
@ -714,6 +714,9 @@
|
||||
<ClCompile Include="..\game\server\movehelper_server.cpp">
|
||||
<Filter>sdk\game\server</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\game\client\movehelper_client.cpp">
|
||||
<Filter>sdk\game\client</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\client\cdll_engine_int.h">
|
||||
@ -2087,6 +2090,9 @@
|
||||
<ClInclude Include="..\game\shared\imovehelper.h">
|
||||
<Filter>sdk\game\shared</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\game\client\movehelper_client.h">
|
||||
<Filter>sdk\game\client</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\shared\resource\lockedserver.png">
|
||||
|
Loading…
x
Reference in New Issue
Block a user