Merge pull request #890 from nullworks/totallynotelite

Fix various small issues
This commit is contained in:
TotallyNotElite 2019-12-22 23:04:03 +01:00 committed by GitHub
commit af0ad64d81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 18 deletions

View File

@ -128,7 +128,7 @@ matrix3x4_t *EntityHitboxCache::GetBones()
{ {
if (g_Settings.is_create_move) if (g_Settings.is_create_move)
{ {
#if ENABLE_TEXTMODE #if !ENABLE_TEXTMODE
if (!*bonecache_enabled || parent_ref->m_Type() != ENTITY_PLAYER || IsPlayerInvisible(parent_ref)) if (!*bonecache_enabled || parent_ref->m_Type() != ENTITY_PLAYER || IsPlayerInvisible(parent_ref))
{ {
PROF_SECTION(bone_setup); PROF_SECTION(bone_setup);

View File

@ -125,7 +125,7 @@ static void doAutoZoom(bool target_found)
{ {
if (target_found) if (target_found)
zoomTime.update(); zoomTime.update();
if (isIdle || !zoomTime.check(5000)) if (isIdle || !zoomTime.check(3000))
{ {
current_user_cmd->buttons |= IN_ATTACK2; current_user_cmd->buttons |= IN_ATTACK2;
} }

View File

@ -105,23 +105,33 @@ void increaseBruteNum(int idx)
static void pitchHook(const CRecvProxyData *pData, void *pStruct, void *pOut) static void pitchHook(const CRecvProxyData *pData, void *pStruct, void *pOut)
{ {
float *ang = (float *) pOut; float flPitch = pData->m_Value.m_Float;
*ang = pData->m_Value.m_Float; float *flPitch_out = (float *) pOut;
if (!enable)
{
*flPitch_out = flPitch;
return;
}
auto client_ent = (IClientEntity *) (pStruct); auto client_ent = (IClientEntity *) (pStruct);
CachedEntity *ent = ENTITY(client_ent->entindex()); CachedEntity *ent = ENTITY(client_ent->entindex());
if (CE_GOOD(ent)) if (CE_GOOD(ent))
*ang = resolveAnglePitch(pData->m_Value.m_Float, resolver_map[ent->player_info.friendsID]); *flPitch_out = resolveAnglePitch(flPitch, resolver_map[ent->player_info.friendsID]);
} }
static void yawHook(const CRecvProxyData *pData, void *pStruct, void *pOut) static void yawHook(const CRecvProxyData *pData, void *pStruct, void *pOut)
{ {
float flYaw = pData->m_Value.m_Float; float flYaw = pData->m_Value.m_Float;
float *flYaw_out = (float *) pOut; float *flYaw_out = (float *) pOut;
auto client_ent = (IClientEntity *) (pStruct); if (!enable)
{
*flYaw_out = flYaw;
return;
}
auto client_ent = (IClientEntity *) (pStruct);
CachedEntity *ent = ENTITY(client_ent->entindex()); CachedEntity *ent = ENTITY(client_ent->entindex());
if (CE_GOOD(ent)) if (CE_GOOD(ent))
*flYaw_out = resolveAngleYaw(flYaw, resolver_map[ent->player_info.friendsID]); *flYaw_out = resolveAngleYaw(flYaw, resolver_map[ent->player_info.friendsID]);

View File

@ -10,13 +10,6 @@ namespace hooked_methods
DEFINE_HOOKED_METHOD(IN_KeyEvent, int, void *this_, int eventcode, ButtonCode_t keynum, const char *binding) DEFINE_HOOKED_METHOD(IN_KeyEvent, int, void *this_, int eventcode, ButtonCode_t keynum, const char *binding)
{ {
#if ENABLE_GUI
/*
if (g_pGUI->ConsumesKey((ButtonCode_t)keynum) && g_pGUI->Visible()) {
return 0;
}
*/
#endif
return original::IN_KeyEvent(this_, eventcode, keynum, binding); return original::IN_KeyEvent(this_, eventcode, keynum, binding);
} }
} // namespace hooked_methods } // namespace hooked_methods

View File

@ -343,7 +343,7 @@ void EffectChams::Render(int x, int y, int w, int h)
{ {
#if !ENFORCE_STREAM_SAFETY #if !ENFORCE_STREAM_SAFETY
PROF_SECTION(DRAW_chams); PROF_SECTION(DRAW_chams);
if (!isHackActive()) if (!isHackActive() || disable_visuals)
return; return;
if (!effect_chams::enable) if (!effect_chams::enable)
return; return;

View File

@ -448,7 +448,7 @@ void EffectGlow::Render(int x, int y, int w, int h)
#if !ENFORCE_STREAM_SAFETY #if !ENFORCE_STREAM_SAFETY
if (!enable) if (!enable)
return; return;
if (!isHackActive() || (clean_screenshots && g_IEngine->IsTakingScreenshot()) || g_Settings.bInvalid) if (!isHackActive() || (clean_screenshots && g_IEngine->IsTakingScreenshot()) || g_Settings.bInvalid || disable_visuals)
return; return;
static ITexture *orig; static ITexture *orig;
static IClientEntity *ent; static IClientEntity *ent;