fix draw bugs 'n crashes
This commit is contained in:
parent
4c76adc9dd
commit
89521493cf
@ -1592,6 +1592,8 @@ void ResetEntityStrings()
|
||||
// Sets an entitys esp color
|
||||
void SetEntityColor(CachedEntity *entity, const rgba_t &color)
|
||||
{
|
||||
if (entity->m_IDX > 2047 || entity->m_IDX < 0)
|
||||
return;
|
||||
data[entity->m_IDX].color = color;
|
||||
}
|
||||
} // namespace hacks::shared::esp
|
||||
|
@ -79,13 +79,15 @@ void EffectChams::EndRenderChams()
|
||||
CMatRenderContextPtr ptr(GET_RENDER_CONTEXT);
|
||||
g_IVModelRender->ForcedMaterialOverride(nullptr);
|
||||
}
|
||||
rgba_t data[32] = {};
|
||||
static rgba_t data[32] = {};
|
||||
void EffectChams::SetEntityColor(CachedEntity *ent, rgba_t color)
|
||||
{
|
||||
if (ent->m_IDX > 31 || ent->m_IDX < 0)
|
||||
return;
|
||||
data[ent->m_IDX] = color;
|
||||
}
|
||||
Timer t{};
|
||||
int prevcolor = -1;
|
||||
static Timer t{};
|
||||
static int prevcolor = -1;
|
||||
rgba_t EffectChams::ChamsColor(IClientEntity *entity)
|
||||
{
|
||||
if (!isHackActive() || !*enable)
|
||||
|
@ -297,7 +297,7 @@ bool EffectGlow::ShouldRenderGlow(IClientEntity *entity)
|
||||
{
|
||||
return *medkits;
|
||||
}
|
||||
else if (type >= ITEM_AMMO_SMALL && type <= ITEM_AMMO_SMALL)
|
||||
else if (type >= ITEM_AMMO_SMALL && type <= ITEM_AMMO_LARGE)
|
||||
{
|
||||
return *ammobox;
|
||||
}
|
||||
|
Reference in New Issue
Block a user