changed something with autostrafe and hitboxstuff
This commit is contained in:
parent
9242ec81fd
commit
47d19babff
@ -15,18 +15,15 @@ Radar
|
||||
AutoTrashtalk
|
||||
Noisemaker Spam
|
||||
Deflected by enemy player
|
||||
Aim Stickies
|
||||
Aim Stickies
|
||||
FLAG ESP
|
||||
no aim sapper
|
||||
Triggerbot ignores vaccinator ubers
|
||||
No AutoShoot (trigger) on consumables and PDAs
|
||||
Improve Projectile Aimbot. A lot.
|
||||
Integrate SEGVCATCH
|
||||
Proper AutoHitbox
|
||||
Smoothe the smooth aim
|
||||
Display on the left
|
||||
Flare aim on fire
|
||||
Triggerbot ambassador correction
|
||||
Aim Sticky
|
||||
Ignore hoovy
|
||||
Proj Pred visuals
|
||||
@ -63,7 +60,6 @@ halloween medkits
|
||||
Heavy Autoshoot continious
|
||||
NoZoom render hook
|
||||
Red money detect
|
||||
Tank ESP
|
||||
carrying esp
|
||||
Tracers/Spy Cam
|
||||
Bodyshot if not zoomed
|
||||
|
@ -36,7 +36,7 @@ IClientEntity* CachedEntity::InternalEntity() {
|
||||
|
||||
void EntityCache::Invalidate() {
|
||||
delete [] m_pArray;
|
||||
m_pArray = new CachedEntity[4096]();
|
||||
m_pArray = new CachedEntity[MAX_ENTITIES]();
|
||||
}
|
||||
|
||||
void CachedEntity::Update(int idx) {
|
||||
@ -234,7 +234,7 @@ matrix3x4_t* CachedEntity::GetBones() {
|
||||
}
|
||||
|
||||
EntityCache::EntityCache() {
|
||||
m_pArray = new CachedEntity[4096]();
|
||||
m_pArray = new CachedEntity[MAX_ENTITIES]();
|
||||
}
|
||||
|
||||
EntityCache::~EntityCache() {
|
||||
@ -247,7 +247,7 @@ void EntityCache::Update() {
|
||||
long p_begin = gECP.CurrentTime();
|
||||
#endif
|
||||
m_nMax = interfaces::entityList->GetHighestEntityIndex();
|
||||
for (int i = 0; i < m_nMax && i < 4096; i++) {
|
||||
for (int i = 0; i < m_nMax && i < MAX_ENTITIES; i++) {
|
||||
//logging::Info("Updating %i", i);
|
||||
m_pArray[i].Update(i);
|
||||
//logging::Info("Back!");
|
||||
|
@ -25,6 +25,7 @@ struct mstudiohitboxset_t;
|
||||
struct mstudiobbox_t;
|
||||
|
||||
#define MAX_STRINGS 16
|
||||
#define MAX_ENTITIES 2048
|
||||
|
||||
#define CE_VAR(entity, offset, type) \
|
||||
NET_VAR(entity->m_pEntity, offset, type)
|
||||
@ -38,7 +39,7 @@ struct mstudiobbox_t;
|
||||
#define CE_GOOD(entity) (!g_Settings.bInvalid && dynamic_cast<CachedEntity*>(entity) && dynamic_cast<IClientEntity*>(entity->m_pEntity) && !entity->m_pEntity->IsDormant())
|
||||
#define CE_BAD(entity) (!CE_GOOD(entity))
|
||||
|
||||
#define IDX_GOOD(idx) (idx >= 0 && idx < HIGHEST_ENTITY)
|
||||
#define IDX_GOOD(idx) (idx >= 0 && idx < HIGHEST_ENTITY && idx < MAX_ENTITIES)
|
||||
#define IDX_BAD(idx) !IDX_GOOD(idx)
|
||||
|
||||
#define PROXY_ENTITY false
|
||||
@ -85,6 +86,8 @@ public:
|
||||
void Update();
|
||||
void InvalidateCache();
|
||||
bool VisibilityCheck(int id);
|
||||
void Init();
|
||||
int GetNumHitboxes();
|
||||
|
||||
bool* m_VisCheckValidationFlags;
|
||||
bool* m_VisCheck;
|
||||
@ -93,6 +96,7 @@ public:
|
||||
model_t* m_pLastModel;
|
||||
bool m_bModelSet;
|
||||
mstudiohitboxset_t* m_pHitboxSet;
|
||||
bool m_bInit;
|
||||
bool m_bSuccess;
|
||||
CachedEntity* m_pParentEntity;
|
||||
bool* m_CacheValidationFlags;
|
||||
|
@ -18,6 +18,12 @@ EntityHitboxCache::EntityHitboxCache(CachedEntity* parent) {
|
||||
m_nNumHitboxes = 0;
|
||||
}
|
||||
|
||||
int EntityHitboxCache::GetNumHitboxes() {
|
||||
if (!m_bInit) Init();
|
||||
if (!m_bSuccess) return 0;
|
||||
return m_nNumHitboxes;
|
||||
}
|
||||
|
||||
EntityHitboxCache::~EntityHitboxCache() {
|
||||
delete [] m_CacheInternal;
|
||||
delete [] m_CacheValidationFlags;
|
||||
@ -35,6 +41,12 @@ void EntityHitboxCache::InvalidateCache() {
|
||||
void EntityHitboxCache::Update() {
|
||||
SAFE_CALL(InvalidateCache());
|
||||
if (CE_BAD(m_pParentEntity)) return;
|
||||
m_bInit = false;
|
||||
m_bSuccess = false;
|
||||
}
|
||||
|
||||
void EntityHitboxCache::Init() {
|
||||
m_bInit = true;
|
||||
model_t* model = 0;
|
||||
SAFE_CALL(model = (model_t*)RAW_ENT(m_pParentEntity)->GetModel());
|
||||
if (!model) return;
|
||||
@ -50,13 +62,14 @@ void EntityHitboxCache::Update() {
|
||||
SAFE_CALL(m_nNumHitboxes = set->numhitboxes);
|
||||
}
|
||||
if (m_nNumHitboxes > CACHE_MAX_HITBOXES) m_nNumHitboxes = CACHE_MAX_HITBOXES;
|
||||
m_bSuccess = true;
|
||||
m_bModelSet = true;
|
||||
}
|
||||
m_bSuccess = true;
|
||||
}
|
||||
|
||||
bool EntityHitboxCache::VisibilityCheck(int id) {
|
||||
if (id < 0 || id >= m_nNumHitboxes) return 0;
|
||||
if (!m_bInit) Init();
|
||||
if (!m_bSuccess) return 0;
|
||||
if (m_VisCheckValidationFlags[id]) return m_VisCheck[id];
|
||||
// TODO corners
|
||||
@ -69,6 +82,7 @@ bool EntityHitboxCache::VisibilityCheck(int id) {
|
||||
|
||||
CachedHitbox* EntityHitboxCache::GetHitbox(int id) {
|
||||
if (id < 0 || id >= m_nNumHitboxes) return 0;
|
||||
if (!m_bInit) Init();
|
||||
if (!m_bSuccess) return 0;
|
||||
if (!m_CacheValidationFlags[id]) {
|
||||
mstudiobbox_t* box = m_pHitboxSet->pHitbox(id);
|
||||
|
@ -310,7 +310,7 @@ int Aimbot::BestHitbox(CachedEntity* target, int preferred) {
|
||||
}
|
||||
}
|
||||
if (target->m_pHitboxCache->VisibilityCheck(preferred)) return preferred;
|
||||
for (int i = m_bProjectileMode ? 1 : 0; i < target->m_pHitboxCache->m_nNumHitboxes; i++) {
|
||||
for (int i = m_bProjectileMode ? 1 : 0; i < target->m_pHitboxCache->GetNumHitboxes(); i++) {
|
||||
if (target->m_pHitboxCache->VisibilityCheck(i)) return i;
|
||||
}
|
||||
return -1;
|
||||
|
@ -20,14 +20,17 @@ AutoStrafe::AutoStrafe() {
|
||||
v_bEnabled = CREATE_CV(CV_SWITCH, "autostrafe", "0", "Enable AutoStrafe");
|
||||
}
|
||||
|
||||
|
||||
bool AutoStrafe::CreateMove(void*, float, CUserCmd* cmd) {
|
||||
if (!v_bEnabled->GetBool()) return true;
|
||||
bool sw = false;
|
||||
if (CE_GOOD(g_pLocalPlayer->entity) && !g_pLocalPlayer->life_state) {
|
||||
// TODO FL_ONGROUND
|
||||
if (CE_INT(g_pLocalPlayer->entity, netvar.iFlags) & (1 << 0)) return true;
|
||||
if (abs(cmd->mousedx) > 1) {
|
||||
cmd->sidemove = (cmd->mousedx) < 0.0f ? -450.0f : 450.0f;
|
||||
}
|
||||
cmd->sidemove += (sw) ? -30.0f : 30.0f;
|
||||
cmd->viewangles.y += sw ? -15.0f : 15.0f;
|
||||
g_pLocalPlayer->bUseSilentAngles = true;
|
||||
sw = !sw;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -24,11 +24,8 @@ bool Glow::CreateMove(void*, float, CUserCmd*) {
|
||||
for (int i = 0; i < HIGHEST_ENTITY; i++) {
|
||||
CachedEntity* ent = ENTITY(i);
|
||||
if (!CE_GOOD_NO_DORMANT_CHECK(ent)) continue;
|
||||
//logging::Info("Processing Glow %i P %i", ent->m_IDX, ent->m_Type == ENTITY_PLAYER ? (v_bEnabled->GetBool() && ent != LOCAL_E && !ent->m_pEntity->IsDormant() && !CE_BYTE(ent, netvar.iLifeState)) : 2);
|
||||
if (ent->m_Type == ENTITY_PLAYER)
|
||||
CE_BYTE(ent, netvar.bGlowEnabled) = (v_bEnabled->GetBool() && (ent != LOCAL_E) && !ent->m_pEntity->IsDormant() && !CE_BYTE(ent, netvar.iLifeState));
|
||||
//if (ent->m_Type == ENTITY_BUILDING)
|
||||
// CE_BYTE(ent, netvar.bGlowEnabled) = (v_bEnabled->GetBool() && !ent->m_pEntity->IsDormant());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -69,12 +69,12 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
||||
SAFE_CALL(CREATE_MOVE(ESP));
|
||||
if (!g_pLocalPlayer->life_state) {
|
||||
SAFE_CALL(CREATE_MOVE(Bunnyhop));
|
||||
SAFE_CALL(CREATE_MOVE(AutoStrafe));
|
||||
SAFE_CALL(CREATE_MOVE(Aimbot));
|
||||
SAFE_CALL(CREATE_MOVE(Airstuck));
|
||||
SAFE_CALL(CREATE_MOVE(AntiAim));
|
||||
SAFE_CALL(CREATE_MOVE(AutoSticky));
|
||||
SAFE_CALL(CREATE_MOVE(AutoReflect));
|
||||
SAFE_CALL(CREATE_MOVE(AutoStrafe));
|
||||
SAFE_CALL(CREATE_MOVE(Triggerbot));
|
||||
SAFE_CALL(CREATE_MOVE(HuntsmanCompensation));
|
||||
}
|
||||
|
Reference in New Issue
Block a user