2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-05-13 20:31:21 +00:00

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

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;