CScriptGunTurret: Fix health check in AcceptScriptMsg Damage

This commit is contained in:
Luke Street 2020-12-18 06:28:20 -05:00
parent ee68e36286
commit dcdfd58715
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ void CScriptGunTurret::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid,
break;
}
case EScriptObjectMessage::Damage: {
if (x258_type == ETurretComponent::Gun && GetHealthInfo(mgr)->GetHP() > 0.f) {
if (x258_type == ETurretComponent::Gun && GetHealthInfo(mgr)->GetHP() <= 0.f) {
if (const TCastToConstPtr<CGameProjectile> proj = mgr.GetObjectById(uid)) {
if ((proj->GetAttribField() & EProjectileAttrib::Wave) == EProjectileAttrib::Wave) {
x520_state = ETurretState::Frenzy;