Skip to content

Commit

Permalink
more x64 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafradek committed Jun 9, 2024
1 parent 84067b7 commit c90df67
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
cd alliedmodders
git clone --recursive https://github.com/alliedmodders/sourcemod --depth 1 -b 1.11-dev
git clone https://github.com/alliedmodders/hl2sdk --depth 1 -b sdk2013 hl2sdk-sdk2013
git clone https://github.com/rafradek/hl2sdk-tf2 --depth 1 hl2sdk-tf2
git clone https://github.com/rafradek/hl2sdk-tf2 --depth 1 -b tf2-fixcpudef hl2sdk-tf2
git clone https://github.com/alliedmodders/hl2sdk --depth 1 -b css hl2sdk-css
git clone https://github.com/alliedmodders/metamod-source --depth 1 -b 1.11-dev
popd
Expand Down
2 changes: 1 addition & 1 deletion src/mem/detour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <regex>


#if !(PLATFORM_64BITS)
#if !(defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) )
#error Architecture must be IA32/64
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/mod/perf/hltv_optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ namespace Mod::Perf::HLTV_Optimize
rtti_scast<CClientFrameManager *>(hltvserver)->RemoveOldestFrame();
}
//DevMsg("SendNow %d\n", gpGlobals->tickcount % tickcount == 0/*reinterpret_cast<CGameClient *>(hltvclient)->ShouldSendMessages()*/);
//if (gpGlobals->tickcount % tickcount != 0)
// return;
if (gpGlobals->tickcount % tickcount != 0)
return;
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/mod/perf/virtual_call_optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ namespace Mod::Perf::Virtual_Call_Optimize
virtual bool GetPatchInfo(ByteBuf& buf, ByteBuf& mask) const override
{
#ifdef PLATFORM_64BITS
buf.SetDword(0xc, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
buf.SetQword(0xc, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
#else
buf.SetDword(0xe + 2, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
#endif
Expand All @@ -246,7 +246,7 @@ namespace Mod::Perf::Virtual_Call_Optimize
virtual bool AdjustPatchInfo(ByteBuf& buf) const override
{
#ifdef PLATFORM_64BITS
buf.SetDword(0xc, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
buf.SetQword(0xc, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
#else
buf.SetDword(0xe + 2, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
#endif
Expand Down Expand Up @@ -316,7 +316,7 @@ namespace Mod::Perf::Virtual_Call_Optimize
virtual bool GetPatchInfo(ByteBuf& buf, ByteBuf& mask) const override
{
#ifdef PLATFORM_64BITS
buf.SetDword(0x9, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
buf.SetQword(0x9, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
#else
buf.SetDword(0xb + 2, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
#endif
Expand All @@ -328,7 +328,7 @@ namespace Mod::Perf::Virtual_Call_Optimize
virtual bool AdjustPatchInfo(ByteBuf& buf) const override
{
#ifdef PLATFORM_64BITS
buf.SetDword(0x9, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
buf.SetQword(0x9, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
#else
buf.SetDword(0xb + 2, (uintptr_t)RTTI::GetVTable("11CStaticProp"));
#endif
Expand Down

0 comments on commit c90df67

Please sign in to comment.