buildings now have lowest priority
This commit is contained in:
parent
816d14cb7a
commit
c4974e534c
@ -22,14 +22,7 @@ int GetScoreForEntity(CachedEntity* entity) {
|
|||||||
// TODO
|
// TODO
|
||||||
if (entity->m_Type == ENTITY_BUILDING) {
|
if (entity->m_Type == ENTITY_BUILDING) {
|
||||||
if (entity->m_iClassID == g_pClassID->CObjectSentrygun) {
|
if (entity->m_iClassID == g_pClassID->CObjectSentrygun) {
|
||||||
float distance = (g_pLocalPlayer->v_Origin - entity->m_vecOrigin).Length();
|
return 1;
|
||||||
// TODO
|
|
||||||
int total = 1;
|
|
||||||
if (distance != 0) {
|
|
||||||
int distance_factor = (4096 / distance) * 4;
|
|
||||||
total += distance_factor;
|
|
||||||
}
|
|
||||||
return 15;
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user