Improved RemoveCond
This commit is contained in:
parent
4610b19b86
commit
60681b08bb
@ -134,20 +134,23 @@ void CreateMove() {
|
|||||||
} else {
|
} else {
|
||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void GetUserCmd(CUserCmd* cmd, int sequence_number) {
|
// Previously was in GetUserCmd
|
||||||
if (!cmd) return;
|
// Thanks Blackfire for helping me improve removecond!
|
||||||
if (!cmd->command_number) return;
|
|
||||||
|
if (!g_pUserCmd) return;
|
||||||
|
if (!g_pUserCmd->command_number) return;
|
||||||
if (!lagMasterSwitch) return;
|
if (!lagMasterSwitch) return;
|
||||||
int amount = int(lagValue);
|
int amount = int(lagValue);
|
||||||
if (!ExploitActive()) {
|
if (!ExploitActive()) {
|
||||||
amount = int(mini_lag_exploit);
|
amount = int(mini_lag_exploit);
|
||||||
}
|
}
|
||||||
if (!amount) return;
|
if (!amount) return;
|
||||||
cmd->command_number += amount;
|
// Modifying command_number and lastoutgoingcommand turned out to be useless
|
||||||
*(int*)((unsigned)g_IBaseClientState + offsets::lastoutgoingcommand()) += amount;
|
|
||||||
//*(INetChannel**)((unsigned)g_IBaseClientState + offsets::m_NetChannel());
|
//cmd->command_number += amount;
|
||||||
|
//*(int*)((unsigned)g_IBaseClientState + offsets::lastoutgoingcommand()) += amount;
|
||||||
|
|
||||||
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 += amount;
|
m_nOutSequenceNr += amount;
|
||||||
|
@ -17,7 +17,6 @@ namespace hacks { namespace shared { namespace lagexploit {
|
|||||||
void CreateMove();
|
void CreateMove();
|
||||||
void AddExploitTicks(int ticks);
|
void AddExploitTicks(int ticks);
|
||||||
bool ExploitActive();
|
bool ExploitActive();
|
||||||
void GetUserCmd(CUserCmd*, int);
|
|
||||||
|
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
|
@ -92,7 +92,6 @@ CUserCmd* GetUserCmd_hook(IInput* _this, int sequence_number) {
|
|||||||
ch = (INetChannel*)g_IEngine->GetNetChannelInfo();//*(INetChannel**)((unsigned)g_IBaseClientState + offsets::m_NetChannel());
|
ch = (INetChannel*)g_IEngine->GetNetChannelInfo();//*(INetChannel**)((unsigned)g_IBaseClientState + offsets::m_NetChannel());
|
||||||
*(int*)((unsigned)ch + offsets::m_nOutSequenceNr()) = def->command_number - 1;
|
*(int*)((unsigned)ch + offsets::m_nOutSequenceNr()) = def->command_number - 1;
|
||||||
}
|
}
|
||||||
hacks::shared::lagexploit::GetUserCmd(def, sequence_number);
|
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user