Merge pull request #130 from julianacat/master
Added more control over lagexploit
This commit is contained in:
commit
e575f2bb87
@ -581,6 +581,8 @@ static const std::string list_tf2 = R"(
|
|||||||
|
|
||||||
"Miscellaneous" [
|
"Miscellaneous" [
|
||||||
"Miscellaneous Settings"
|
"Miscellaneous Settings"
|
||||||
|
"removecond_master"
|
||||||
|
"removecond_value"
|
||||||
"removecond_key"
|
"removecond_key"
|
||||||
"removecond_fire"
|
"removecond_fire"
|
||||||
"removecond_taunt"
|
"removecond_taunt"
|
||||||
|
@ -11,6 +11,8 @@ namespace hacks { namespace shared { namespace lagexploit {
|
|||||||
|
|
||||||
CatVar toggle(CV_SWITCH, "removecond_toggle", "0", "Toggle Lag Exploit", "Toggle lag exploit (RemoveCond)");
|
CatVar toggle(CV_SWITCH, "removecond_toggle", "0", "Toggle Lag Exploit", "Toggle lag exploit (RemoveCond)");
|
||||||
CatVar key(CV_KEY, "removecond_key", "0", "RemoveCond Key");
|
CatVar key(CV_KEY, "removecond_key", "0", "RemoveCond Key");
|
||||||
|
CatVar lagMasterSwitch(CV_SWITCH, "removecond_master", "1", "Master Lag Exploit Switch", "Master switch for the lag exploit\nDisabling this disables everything else that uses remove conds");
|
||||||
|
CatVar lagValue(CV_INT, "removecond_value", "450", "RemoveCond Value", "Value of user cmds to spam with");
|
||||||
|
|
||||||
CatCommand do_lagexploit("removecond", "RemoveCond (for use in scripts)", []() {
|
CatCommand do_lagexploit("removecond", "RemoveCond (for use in scripts)", []() {
|
||||||
AddExploitTicks(6);
|
AddExploitTicks(6);
|
||||||
@ -95,14 +97,15 @@ void CreateMove() {
|
|||||||
|
|
||||||
void GetUserCmd(CUserCmd* cmd, int sequence_number) {
|
void GetUserCmd(CUserCmd* cmd, int sequence_number) {
|
||||||
if (!ExploitActive()) return;
|
if (!ExploitActive()) return;
|
||||||
|
if (!lagMasterSwitch) return;
|
||||||
if (!cmd) return;
|
if (!cmd) return;
|
||||||
if (!cmd->command_number) return;
|
if (!cmd->command_number) return;
|
||||||
cmd->command_number += 450;
|
cmd->command_number += (int)lagValue;
|
||||||
*(int*)((unsigned)g_IBaseClientState + offsets::lastoutgoingcommand()) += 450;
|
*(int*)((unsigned)g_IBaseClientState + offsets::lastoutgoingcommand()) += (int)lagValue;
|
||||||
//*(INetChannel**)((unsigned)g_IBaseClientState + offsets::m_NetChannel());
|
//*(INetChannel**)((unsigned)g_IBaseClientState + offsets::m_NetChannel());
|
||||||
INetChannel* ch = (INetChannel*)g_IEngine->GetNetChannelInfo();
|
INetChannel* ch = (INetChannel*)g_IEngine->GetNetChannelInfo();
|
||||||
int& m_nOutSequenceNr = *(int*)((unsigned)ch + offsets::m_nOutSequenceNr());
|
int& m_nOutSequenceNr = *(int*)((unsigned)ch + offsets::m_nOutSequenceNr());
|
||||||
m_nOutSequenceNr += 450;
|
m_nOutSequenceNr += (int)lagValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
}}}
|
}}}
|
||||||
|
Reference in New Issue
Block a user