Storm/Perform_Shove_Trace.hpp

23 lines
547 B
C++
Raw Normal View History

2024-04-04 03:17:09 +08:00
void __thiscall Perform_Shove_Trace(void* Stack)
{
void* Entity = *(void**)((unsigned __int32)Stack - 276);
if (Entity == Perform_Trace_Target)
2024-04-04 03:17:09 +08:00
{
Perform_Trace_Damage = 1;
2024-04-04 03:17:09 +08:00
}
}
void* Original_Perform_Shove_Trace_Caller;
void __declspec(naked) Redirected_Perform_Shove_Trace()
{
2024-10-09 12:00:21 +08:00
asm("leal -304(%ebp), %eax");
asm("pushl %eax");
asm("calll *%edx");
asm("pushal");
asm("movl %esp, %ecx");
2024-10-07 03:45:39 +08:00
asm("calll %0" : : "m"(Perform_Shove_Trace));
2024-10-09 12:00:21 +08:00
asm("popal");
asm("jmpl *%0" : : "m"(Original_Perform_Shove_Trace_Caller));
2024-04-04 03:17:09 +08:00
}