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

View File

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