Fix shriekbat damage

This commit is contained in:
Luke Street 2020-01-02 19:54:59 -05:00
parent 445bc27faf
commit 67d0fa55df
2 changed files with 5 additions and 4 deletions

View File

@ -18,6 +18,7 @@ CMetaree::CMetaree(TUniqueId uid, std::string_view name, EFlavorType flavor, con
, x570_dropHeight(f1) , x570_dropHeight(f1)
, x574_offset(v1) , x574_offset(v1)
, x580_attackSpeed(f2) , x580_attackSpeed(f2)
, x5ac_damageInfo(dInfo)
, x5ca_24_(true) , x5ca_24_(true)
, x5ca_25_started(false) , x5ca_25_started(false)
, x5ca_26_deactivated(false) {} , x5ca_26_deactivated(false) {}
@ -47,7 +48,7 @@ void CMetaree::Explode(CStateManager& mgr, EStateMsg msg, float) {
if (msg != EStateMsg::Activate) if (msg != EStateMsg::Activate)
return; return;
mgr.ApplyDamage(GetUniqueId(), mgr.GetPlayer().GetUniqueId(), GetUniqueId(), x5ac_damgeInfo, mgr.ApplyDamage(GetUniqueId(), mgr.GetPlayer().GetUniqueId(), GetUniqueId(), x5ac_damageInfo,
CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {}), {}); CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {}), {});
MassiveDeath(mgr); MassiveDeath(mgr);
} }
@ -69,7 +70,7 @@ void CMetaree::CollidedWith(TUniqueId id, const CCollisionInfoList& colList, CSt
if (!x400_25_alive || colList.GetCount() <= 0) if (!x400_25_alive || colList.GetCount() <= 0)
return; return;
mgr.ApplyDamageToWorld(GetUniqueId(), *this, GetTranslation(), x5ac_damgeInfo, mgr.ApplyDamageToWorld(GetUniqueId(), *this, GetTranslation(), x5ac_damageInfo,
CMaterialFilter::MakeInclude({EMaterialTypes::Player})); CMaterialFilter::MakeInclude({EMaterialTypes::Player}));
SendScriptMsgs(EScriptObjectState::Arrived, mgr, EScriptObjectMessage::None); SendScriptMsgs(EScriptObjectState::Arrived, mgr, EScriptObjectMessage::None);
MassiveDeath(mgr); MassiveDeath(mgr);
@ -100,7 +101,7 @@ void CMetaree::Dead(CStateManager& mgr, EStateMsg msg, float) {
if (msg != EStateMsg::Activate) if (msg != EStateMsg::Activate)
return; return;
mgr.ApplyDamageToWorld(GetUniqueId(), *this, GetTranslation(), x5ac_damgeInfo, mgr.ApplyDamageToWorld(GetUniqueId(), *this, GetTranslation(), x5ac_damageInfo,
CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Player}, {})); CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Player}, {}));
DeathDelete(mgr); DeathDelete(mgr);
} }

View File

@ -18,7 +18,7 @@ class CMetaree : public CPatterned {
zeus::CVector3f x590_projectileDelta; zeus::CVector3f x590_projectileDelta;
zeus::CVector3f x59c_velocity; zeus::CVector3f x59c_velocity;
u32 x5a8_ = 0; u32 x5a8_ = 0;
CDamageInfo x5ac_damgeInfo; CDamageInfo x5ac_damageInfo;
u16 x5c8_attackSfx = SFXsfx0225; u16 x5c8_attackSfx = SFXsfx0225;
struct { struct {