tank aimbot

This commit is contained in:
bencat07 2019-05-25 18:18:47 +02:00
parent 97dea19521
commit 0adf4fc387

View File

@ -73,7 +73,7 @@ int GetSentry()
CachedEntity *ent = ENTITY(i); CachedEntity *ent = ENTITY(i);
if (CE_BAD(ent)) if (CE_BAD(ent))
continue; continue;
if (ent->m_Type() != ENTITY_BUILDING || ent->m_iClassID() != CL_CLASS(CObjectSentrygun)) if ((ent->m_Type() != ENTITY_BUILDING && ent->m_iClassID() != CL_CLASS(CTFTankBoss)) || ent->m_iClassID() != CL_CLASS(CObjectSentrygun))
continue; continue;
if ((CE_INT(ent, netvar.m_hBuilder) & 0xFFF) != g_pLocalPlayer->entity_idx) if ((CE_INT(ent, netvar.m_hBuilder) & 0xFFF) != g_pLocalPlayer->entity_idx)
continue; continue;
@ -619,7 +619,7 @@ bool IsTargetStateGood(CachedEntity *entity)
// Check for buildings // Check for buildings
} }
else if (entity->m_Type() == ENTITY_BUILDING) else if (entity->m_Type() == ENTITY_BUILDING || entity->m_iClassID() == CL_CLASS(CTFTankBoss))
{ {
// Don't aim if holding sapper // Don't aim if holding sapper
if (g_pLocalPlayer->holding_sapper) if (g_pLocalPlayer->holding_sapper)
@ -958,7 +958,7 @@ const Vector &PredictEntity(CachedEntity *entity)
} }
// Buildings // Buildings
} }
else if (entity->m_Type() == ENTITY_BUILDING) else if (entity->m_Type() == ENTITY_BUILDING || entity->m_iClassID() != CL_CLASS(CTFTankBoss))
{ {
if (cur_proj_grav || cur_proj_grav) if (cur_proj_grav || cur_proj_grav)
result = BuildingPrediction(entity, GetBuildingPosition(entity), cur_proj_speed, cur_proj_grav); result = BuildingPrediction(entity, GetBuildingPosition(entity), cur_proj_speed, cur_proj_grav);