[Slowmotion] Optimize killcam
This commit is contained in:
parent
527f93803c
commit
1760741975
@ -54,6 +54,8 @@ namespace Components
|
|||||||
Command::Execute("xstartprivatematch");
|
Command::Execute("xstartprivatematch");
|
||||||
//Command::Execute("xstartlobby");
|
//Command::Execute("xstartlobby");
|
||||||
Command::Execute("sv_network_fps 1000");
|
Command::Execute("sv_network_fps 1000");
|
||||||
|
Command::Execute("cl_maxpackets 125");
|
||||||
|
Command::Execute("snaps 30");
|
||||||
Command::Execute("com_maxfps 125");
|
Command::Execute("com_maxfps 125");
|
||||||
|
|
||||||
// Process command line?
|
// Process command line?
|
||||||
|
@ -348,6 +348,13 @@ namespace Components
|
|||||||
// increase cl_maxpackets limit
|
// increase cl_maxpackets limit
|
||||||
Utils::Hook::Set<BYTE>(0x4050A1, 125);
|
Utils::Hook::Set<BYTE>(0x4050A1, 125);
|
||||||
|
|
||||||
|
// increase snaps
|
||||||
|
//Utils::Hook::Set<BYTE>(0x405357, 40);
|
||||||
|
|
||||||
|
// default maxpackets and snaps
|
||||||
|
Utils::Hook::Set<BYTE>(0x40535B, 30);
|
||||||
|
Utils::Hook::Set<BYTE>(0x4050A5, 125);
|
||||||
|
|
||||||
// Parse port as short in Net_AddrToString
|
// Parse port as short in Net_AddrToString
|
||||||
Utils::Hook::Set<char*>(0x4698E3, "%u.%u.%u.%u:%hu");
|
Utils::Hook::Set<char*>(0x4698E3, "%u.%u.%u.%u:%hu");
|
||||||
|
|
||||||
|
@ -74,13 +74,21 @@ namespace Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SlowMotion::SlowMotion()
|
void SlowMotion::DrawConnectionInterruptedStub(int a1)
|
||||||
{
|
{
|
||||||
if (Dedicated::IsEnabled())
|
if (!*reinterpret_cast<bool*>(0x1AD8ED0) && !*reinterpret_cast<bool*>(0x1AD8EEC) && !*reinterpret_cast<int*>(0x1AD78F8))
|
||||||
{
|
{
|
||||||
SlowMotion::Delay = 0;
|
Utils::Hook::Call<void(int)>(0x454A70)(a1);
|
||||||
Utils::Hook(0x5F5FF2, SlowMotion::SetSlowMotion, HOOK_JUMP).install()->quick();
|
|
||||||
Utils::Hook(0x60B38A, SlowMotion::ApplySlowMotionStub, HOOK_CALL).install()->quick();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SlowMotion::SlowMotion()
|
||||||
|
{
|
||||||
|
SlowMotion::Delay = 0;
|
||||||
|
Utils::Hook(0x5F5FF2, SlowMotion::SetSlowMotion, HOOK_JUMP).install()->quick();
|
||||||
|
Utils::Hook(0x60B38A, SlowMotion::ApplySlowMotionStub, HOOK_CALL).install()->quick();
|
||||||
|
|
||||||
|
Utils::Hook(0x4A54ED, SlowMotion::DrawConnectionInterruptedStub, HOOK_CALL).install()->quick();
|
||||||
|
Utils::Hook(0x4A54FB, SlowMotion::DrawConnectionInterruptedStub, HOOK_CALL).install()->quick();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,5 +16,7 @@ namespace Components
|
|||||||
static void SetSlowMotion();
|
static void SetSlowMotion();
|
||||||
static void ApplySlowMotion(int timePassed);
|
static void ApplySlowMotion(int timePassed);
|
||||||
static void ApplySlowMotionStub();
|
static void ApplySlowMotionStub();
|
||||||
|
|
||||||
|
static void DrawConnectionInterruptedStub(int a1);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user