SetSlowMotion Fix #2
This commit is contained in:
parent
de0b8adc82
commit
ed62d96690
@ -3,22 +3,35 @@
|
|||||||
namespace Components
|
namespace Components
|
||||||
{
|
{
|
||||||
int SlowMotion::Delay = 0;
|
int SlowMotion::Delay = 0;
|
||||||
DWORD applySlowMotionHookLoc = 0x60B2D0;
|
|
||||||
|
|
||||||
void SlowMotion::ApplySlowMotionStub(int timePassed)
|
void SlowMotion::ApplySlowMotion(int timePassed)
|
||||||
{
|
{
|
||||||
if (SlowMotion::Delay <= 0)
|
if (SlowMotion::Delay <= 0)
|
||||||
{
|
{
|
||||||
__asm
|
Utils::Hook::Call<void(int)>(0x60B2D0)(timePassed);
|
||||||
{
|
|
||||||
push timePassed
|
|
||||||
call applySlowMotionHookLoc
|
|
||||||
add esp, 4h
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
SlowMotion::Delay -= timePassed;
|
SlowMotion::Delay -= timePassed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__declspec(naked) void SlowMotion::ApplySlowMotionStub()
|
||||||
|
{
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
pushad
|
||||||
|
push[esp + 18h]
|
||||||
|
|
||||||
|
call SlowMotion::ApplySlowMotion
|
||||||
|
|
||||||
|
add esp, 4
|
||||||
|
popad
|
||||||
|
|
||||||
|
retn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SlowMotion::SetSlowMotion()
|
void SlowMotion::SetSlowMotion()
|
||||||
{
|
{
|
||||||
int duration = 1000;
|
int duration = 1000;
|
||||||
@ -63,10 +76,10 @@ namespace Components
|
|||||||
|
|
||||||
void SlowMotion::DrawConnectionInterruptedStub(int /*a1*/)
|
void SlowMotion::DrawConnectionInterruptedStub(int /*a1*/)
|
||||||
{
|
{
|
||||||
// if (!*reinterpret_cast<bool*>(0x1AD8ED0) && !*reinterpret_cast<bool*>(0x1AD8EEC) && !*reinterpret_cast<int*>(0x1AD78F8))
|
// if (!*reinterpret_cast<bool*>(0x1AD8ED0) && !*reinterpret_cast<bool*>(0x1AD8EEC) && !*reinterpret_cast<int*>(0x1AD78F8))
|
||||||
// {
|
// {
|
||||||
// Utils::Hook::Call<void(int)>(0x454A70)(a1);
|
// Utils::Hook::Call<void(int)>(0x454A70)(a1);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
SlowMotion::SlowMotion()
|
SlowMotion::SlowMotion()
|
||||||
|
@ -14,8 +14,9 @@ namespace Components
|
|||||||
static int Delay;
|
static int Delay;
|
||||||
|
|
||||||
static void SetSlowMotion();
|
static void SetSlowMotion();
|
||||||
static void ApplySlowMotionStub(int timePassed);
|
static void ApplySlowMotion(int timePassed);
|
||||||
|
static void ApplySlowMotionStub();
|
||||||
|
|
||||||
static void DrawConnectionInterruptedStub(int a1);
|
static void DrawConnectionInterruptedStub(int a1);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user