This commit is contained in:
nullifiedcat 2017-11-13 08:34:20 +03:00
parent 429bb71138
commit eccb59f952
6 changed files with 15 additions and 2 deletions

View File

@ -67,6 +67,7 @@
<listOptionValue builtIn="false" value="GNUC=1"/> <listOptionValue builtIn="false" value="GNUC=1"/>
<listOptionValue builtIn="false" value="NO_MALLOC_OVERRIDE"/> <listOptionValue builtIn="false" value="NO_MALLOC_OVERRIDE"/>
<listOptionValue builtIn="false" value="ENABLE_VISUALS=1"/> <listOptionValue builtIn="false" value="ENABLE_VISUALS=1"/>
<listOptionValue builtIn="false" value="RENDERING_ENGINE_XOVERLAY=1"/>
</option> </option>
<option id="gnu.cpp.compiler.option.debugging.other.1695695237" name="Other debugging flags" superClass="gnu.cpp.compiler.option.debugging.other" useByScannerDiscovery="false" value="-ggdb" valueType="string"/> <option id="gnu.cpp.compiler.option.debugging.other.1695695237" name="Other debugging flags" superClass="gnu.cpp.compiler.option.debugging.other" useByScannerDiscovery="false" value="-ggdb" valueType="string"/>
<option id="gnu.cpp.compiler.option.dialect.flags.1534861554" name="Other dialect flags" superClass="gnu.cpp.compiler.option.dialect.flags" useByScannerDiscovery="true" value="-std=gnu++11" valueType="string"/> <option id="gnu.cpp.compiler.option.dialect.flags.1534861554" name="Other dialect flags" superClass="gnu.cpp.compiler.option.dialect.flags" useByScannerDiscovery="true" value="-std=gnu++11" valueType="string"/>

View File

@ -36,7 +36,7 @@ void rendering_routine()
while (true) while (true)
{ {
xpcmutex_lock(server_throttle_mutex); xpcmutex_lock(server_throttle_mutex);
PROF_SECTION(DRAWEX_rendering_routine) PROF_SECTION(DRAWEX_rendering_routine);
if (hack::initialized && api::ready_state) if (hack::initialized && api::ready_state)
{ {
BeginCheatVisuals(); BeginCheatVisuals();
@ -49,7 +49,7 @@ void rendering_routine()
EndCheatVisuals(); EndCheatVisuals();
} }
xpcmutex_unlock(server_throttle_mutex); xpcmutex_unlock(server_throttle_mutex);
usleep(1000000 / 100); usleep(1000000 / 45);
//std::this_thread::sleep_for(std::chrono::seconds(1)); //std::this_thread::sleep_for(std::chrono::seconds(1));
} }
} }

View File

@ -82,6 +82,8 @@ bool EntityHitboxCache::VisibilityCheck(int id) {
static CatEnum setupbones_time_enum({ "ZERO", "CURTIME", "LP SERVERTIME", "SIMTIME" }); static CatEnum setupbones_time_enum({ "ZERO", "CURTIME", "LP SERVERTIME", "SIMTIME" });
static CatVar setupbones_time(setupbones_time_enum, "setupbones_time", "3", "Setupbones", "Defines setupbones 4th argument, change it if your aimbot misses, idk!!"); static CatVar setupbones_time(setupbones_time_enum, "setupbones_time", "3", "Setupbones", "Defines setupbones 4th argument, change it if your aimbot misses, idk!!");
std::mutex setupbones_mutex;
matrix3x4_t* EntityHitboxCache::GetBones() { matrix3x4_t* EntityHitboxCache::GetBones() {
static float bones_setup_time = 0.0f; static float bones_setup_time = 0.0f;
switch ((int)setupbones_time) { switch ((int)setupbones_time) {
@ -97,6 +99,7 @@ matrix3x4_t* EntityHitboxCache::GetBones() {
bones_setup_time = CE_FLOAT(parent_ref, netvar.m_flSimulationTime); bones_setup_time = CE_FLOAT(parent_ref, netvar.m_flSimulationTime);
} }
if (!bones_setup) { if (!bones_setup) {
std::lock_guard<std::mutex> lock(setupbones_mutex);
bones_setup = RAW_ENT(parent_ref)->SetupBones(bones, MAXSTUDIOBONES, 0x100, bones_setup_time); bones_setup = RAW_ENT(parent_ref)->SetupBones(bones, MAXSTUDIOBONES, 0x100, bones_setup_time);
} }
return bones; return bones;

View File

@ -45,6 +45,7 @@ class GlobalSettings {
public: public:
void Init(); void Init();
bool bInvalid { true }; bool bInvalid { true };
bool is_create_move { false };
Vector last_angles; Vector last_angles;
}; };

View File

@ -335,6 +335,7 @@ bool IsEntityVisible(CachedEntity* entity, int hb) {
} }
std::mutex trace_lock;
bool IsEntityVectorVisible(CachedEntity* entity, Vector endpos) { bool IsEntityVectorVisible(CachedEntity* entity, Vector endpos) {
trace_t trace_object; trace_t trace_object;
Ray_t ray; Ray_t ray;
@ -347,6 +348,7 @@ bool IsEntityVectorVisible(CachedEntity* entity, Vector endpos) {
ray.Init(g_pLocalPlayer->v_Eye, endpos); ray.Init(g_pLocalPlayer->v_Eye, endpos);
{ {
PROF_SECTION(IEVV_TraceRay); PROF_SECTION(IEVV_TraceRay);
std::lock_guard<std::mutex> lock(trace_lock);
g_ITrace->TraceRay(ray, MASK_SHOT_HULL, &trace::filter_default, &trace_object); g_ITrace->TraceRay(ray, MASK_SHOT_HULL, &trace::filter_default, &trace_object);
} }
return (trace_object.fraction >= 0.99f || (((IClientEntity*)trace_object.m_pEnt)) == RAW_ENT(entity)); return (trace_object.fraction >= 0.99f || (((IClientEntity*)trace_object.m_pEnt)) == RAW_ENT(entity));

View File

@ -104,6 +104,7 @@ static CatVar debug_projectiles(CV_SWITCH, "debug_projectiles", "0", "Debug Proj
static CatVar fakelag_amount(CV_INT, "fakelag", "0", "Bad Fakelag"); static CatVar fakelag_amount(CV_INT, "fakelag", "0", "Bad Fakelag");
bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) { bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
g_Settings.is_create_move = true;
static CreateMove_t original_method = (CreateMove_t)hooks::clientmode.GetMethod(offsets::CreateMove()); static CreateMove_t original_method = (CreateMove_t)hooks::clientmode.GetMethod(offsets::CreateMove());
bool time_replaced, ret, speedapplied; bool time_replaced, ret, speedapplied;
float curtime_old, servertime, speed, yaw; float curtime_old, servertime, speed, yaw;
@ -125,15 +126,18 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
PROF_SECTION(CreateMove); PROF_SECTION(CreateMove);
if (!cmd) { if (!cmd) {
g_Settings.is_create_move = false;
return ret; return ret;
} }
if (!cathook) { if (!cathook) {
g_Settings.is_create_move = false;
return ret; return ret;
} }
if (!g_IEngine->IsInGame()) { if (!g_IEngine->IsInGame()) {
g_Settings.bInvalid = true; g_Settings.bInvalid = true;
g_Settings.is_create_move = false;
return true; return true;
} }
@ -281,6 +285,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
} }
// Walkbot can leave game. // Walkbot can leave game.
if (!g_IEngine->IsInGame()) { if (!g_IEngine->IsInGame()) {
g_Settings.is_create_move = false;
return ret; return ret;
} }
IF_GAME (IsTF()) { IF_GAME (IsTF()) {
@ -427,6 +432,7 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
//LoadSavedState(); //LoadSavedState();
} }
g_pLocalPlayer->bAttackLastTick = (cmd->buttons & IN_ATTACK); g_pLocalPlayer->bAttackLastTick = (cmd->buttons & IN_ATTACK);
g_Settings.is_create_move = false;
return ret; return ret;
SEGV_END; SEGV_END;