autosticky dead autobackstab invis
This commit is contained in:
parent
b932349e6d
commit
b06a140b16
@ -47,6 +47,7 @@ CachedEntity* ClosestSpy() {
|
||||
if (CE_BYTE(ent, netvar.iLifeState)) continue;
|
||||
if (CE_INT(ent, netvar.iClass) != tf_class::tf_spy) continue;
|
||||
if (CE_INT(ent, netvar.iTeamNum) == g_pLocalPlayer->team) continue;
|
||||
if (IsPlayerInvisible(ent)) continue;
|
||||
float dist = ent->m_flDistance;
|
||||
if (fabs(GetAngle(ent)) > (float)angle) {
|
||||
break;
|
||||
|
@ -22,6 +22,9 @@ bool ShouldDetonate(CachedEntity* bomb) {
|
||||
if (CE_BAD(ent)) continue;
|
||||
if (ent->m_Type != ENTITY_PLAYER && (ent->m_Type != ENTITY_BUILDING || !buildings)) continue;
|
||||
if (ent->m_iTeam == CE_INT(bomb, netvar.iTeamNum)) continue;
|
||||
if (ent->m_Type == ENTITY_PLAYER) {
|
||||
if (CE_BYTE(ent, netvar.iLifeState) != LIFE_ALIVE) continue;
|
||||
}
|
||||
if (ent->m_vecOrigin.DistToSqr(bomb->m_vecOrigin) > SQR((float)distance)) continue;
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user