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