kinda fixed autosticky, aimbot will no longer try to aim with stickybomb
launcher
This commit is contained in:
parent
280da4d06e
commit
6164a0d3da
4
TODO
4
TODO
@ -6,6 +6,9 @@ TF2C teams
|
|||||||
TF2C merc
|
TF2C merc
|
||||||
HL2DM teams
|
HL2DM teams
|
||||||
|
|
||||||
|
Fix Autosticky
|
||||||
|
Proj Aimbot
|
||||||
|
|
||||||
fullbright toggle
|
fullbright toggle
|
||||||
Hunter Rifle
|
Hunter Rifle
|
||||||
inspect shit
|
inspect shit
|
||||||
@ -18,7 +21,6 @@ namesteal
|
|||||||
autovote
|
autovote
|
||||||
voice command spam (not like 1 voice command every 1 ms but like just spamming it on the menu)
|
voice command spam (not like 1 voice command every 1 ms but like just spamming it on the menu)
|
||||||
|
|
||||||
Player List
|
|
||||||
dominatesay assistsay worldsay
|
dominatesay assistsay worldsay
|
||||||
AutoDetonator
|
AutoDetonator
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ void CreateMove() {
|
|||||||
headonly = false;
|
headonly = false;
|
||||||
|
|
||||||
if (g_pLocalPlayer->weapon()->m_iClassID == g_pClassID->CTFGrapplingHook) return;
|
if (g_pLocalPlayer->weapon()->m_iClassID == g_pClassID->CTFGrapplingHook) return;
|
||||||
|
if (g_pLocalPlayer->weapon()->m_iClassID == g_pClassID->CTFPipebombLauncher) return;
|
||||||
|
|
||||||
projectile_mode = (GetProjectileData(g_pLocalPlayer->weapon(), cur_proj_speed, cur_proj_grav));
|
projectile_mode = (GetProjectileData(g_pLocalPlayer->weapon(), cur_proj_speed, cur_proj_grav));
|
||||||
if (proj_speed)
|
if (proj_speed)
|
||||||
|
@ -14,34 +14,49 @@ namespace hacks { namespace tf { namespace autosticky {
|
|||||||
|
|
||||||
CatVar enabled(CV_SWITCH, "sticky_enabled", "0", "AutoSticky", "Master AutoSticky switch");
|
CatVar enabled(CV_SWITCH, "sticky_enabled", "0", "AutoSticky", "Master AutoSticky switch");
|
||||||
CatVar buildings(CV_SWITCH, "sticky_buildings", "1", "Detonate buildings", "Stickies react to buildings");
|
CatVar buildings(CV_SWITCH, "sticky_buildings", "1", "Detonate buildings", "Stickies react to buildings");
|
||||||
CatVar distance(CV_INT, "sticky_distance", "200", "Distance", "Maximum distance to detonate");
|
CatVar distance(CV_INT, "sticky_distance", "150", "Distance", "Maximum distance to detonate");
|
||||||
|
|
||||||
bool ShouldDetonate(CachedEntity* bomb) {
|
std::vector<CachedEntity*> bombs;
|
||||||
for (int i = 0; i < HIGHEST_ENTITY; i++) {
|
std::vector<CachedEntity*> targets;
|
||||||
CachedEntity* ent = ENTITY(i);
|
|
||||||
if (CE_BAD(ent)) continue;
|
bool IsBomb(CachedEntity* ent) {
|
||||||
if (ent->m_Type != ENTITY_PLAYER && (ent->m_Type != ENTITY_BUILDING || !buildings)) continue;
|
if (ent->m_iClassID != g_pClassID->CTFGrenadePipebombProjectile) return false;
|
||||||
if (ent->m_iTeam == CE_INT(bomb, netvar.iTeamNum)) continue;
|
if (CE_INT(ent, netvar.iPipeType) != 1) return false;
|
||||||
if (ent->m_Type == ENTITY_PLAYER) {
|
if ((CE_INT(ent, netvar.hThrower) & 0xFFF) != g_pLocalPlayer->entity->m_IDX) return false;
|
||||||
if (CE_BYTE(ent, netvar.iLifeState) != LIFE_ALIVE) continue;
|
|
||||||
}
|
|
||||||
if (ent->m_vecOrigin.DistToSqr(bomb->m_vecOrigin) > SQR((float)distance)) continue;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsTarget(CachedEntity* ent) {
|
||||||
|
if (!ent->m_bEnemy) return false;
|
||||||
|
if (ent->m_Type == ENTITY_PLAYER) {
|
||||||
|
if (CE_BYTE(ent, netvar.iLifeState)) return false;
|
||||||
|
return true;
|
||||||
|
} else if (ent->m_Type == ENTITY_BUILDING) {
|
||||||
|
return buildings;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateMove() {
|
void CreateMove() {
|
||||||
if (!enabled) return;
|
if (!enabled) return;
|
||||||
if (g_pLocalPlayer->clazz != tf_demoman) return;
|
if (g_pLocalPlayer->clazz != tf_demoman) return;
|
||||||
|
bombs.clear();
|
||||||
|
targets.clear();
|
||||||
for (int i = 0; i < HIGHEST_ENTITY; i++) {
|
for (int i = 0; i < HIGHEST_ENTITY; i++) {
|
||||||
CachedEntity* ent = ENTITY(i);
|
CachedEntity* ent = ENTITY(i);
|
||||||
if (CE_BAD(ent)) continue;
|
if (CE_BAD(ent)) continue;
|
||||||
if (ent->m_iClassID != g_pClassID->CTFGrenadePipebombProjectile) continue;
|
if (IsBomb(ent)) {
|
||||||
if (CE_INT(ent, netvar.iPipeType) != 1) continue;
|
bombs.push_back(ent);
|
||||||
if ((CE_INT(ent, netvar.hThrower) & 0xFFF) != g_pLocalPlayer->entity->m_IDX) continue;
|
} else if (IsTarget(ent)) {
|
||||||
if (ShouldDetonate(ent)) {
|
targets.push_back(ent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (auto bomb : bombs) {
|
||||||
|
for (auto target : targets) {
|
||||||
|
if (bomb->m_vecOrigin.DistToSqr(target->m_vecOrigin) < ((float)distance * (float)distance)) {
|
||||||
g_pUserCmd->buttons |= IN_ATTACK2;
|
g_pUserCmd->buttons |= IN_ATTACK2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user