Don't path away from sentry if it doesn't have ammo (#1544)
Don't path away from sentry if it doesn't have ammo Co-authored-by: BenCat07 <BenCat07@gmail.com>
This commit is contained in:
parent
35a0597066
commit
39053dae45
@ -368,7 +368,9 @@ public:
|
||||
// Should we even ignore the sentry?
|
||||
// Soldier/Heavy do not care about Level 1 or mini sentries
|
||||
bool is_strong_class = g_pLocalPlayer->clazz == tf_soldier || g_pLocalPlayer->clazz == tf_heavy;
|
||||
if (is_strong_class && (CE_BYTE(ent, netvar.m_bMiniBuilding) || CE_INT(ent, netvar.iUpgradeLevel) == 1))
|
||||
int bullet = CE_INT(ent, netvar.m_iAmmoShells);
|
||||
int rocket = CE_INT(ent, netvar.m_iAmmoRockets);
|
||||
if ((is_strong_class && (CE_BYTE(ent, netvar.m_bMiniBuilding) || CE_INT(ent, netvar.iUpgradeLevel) == 1)) || (bullet == 0 && (CE_INT(ent, netvar.iUpgradeLevel) != 3 || rocket == 0)))
|
||||
continue;
|
||||
|
||||
// It's still building/being sapped, ignore.
|
||||
|
Reference in New Issue
Block a user