mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #145 from lioncash/blood-collision
CBloodFlower: Implement GetCollisionResponseType
This commit is contained in:
commit
330a1bff76
|
@ -148,6 +148,17 @@ void CBloodFlower::Render(const CStateManager& mgr) const {
|
|||
x574_podEffect->Render(GetActorLights());
|
||||
}
|
||||
|
||||
EWeaponCollisionResponseTypes CBloodFlower::GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
||||
const CWeaponMode& weaponMode, EProjectileAttrib) const {
|
||||
const auto* const damageVulnerability = GetDamageVulnerability();
|
||||
|
||||
if (damageVulnerability->WeaponHurts(weaponMode, false)) {
|
||||
return EWeaponCollisionResponseTypes::Unknown28;
|
||||
}
|
||||
|
||||
return EWeaponCollisionResponseTypes::Unknown78;
|
||||
}
|
||||
|
||||
bool CBloodFlower::ShouldAttack(CStateManager& mgr, float arg) {
|
||||
if (TooClose(mgr, 0.f))
|
||||
return false;
|
||||
|
|
|
@ -56,6 +56,9 @@ public:
|
|||
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt) override;
|
||||
void Render(const CStateManager& mgr) const override;
|
||||
void Touch(CActor&, CStateManager&) override {}
|
||||
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f& v1, const zeus::CVector3f& v2,
|
||||
const CWeaponMode& weaponMode,
|
||||
EProjectileAttrib attribute) const override;
|
||||
CProjectileInfo* GetProjectileInfo() override { return &x590_projectileInfo; }
|
||||
|
||||
bool ShouldAttack(CStateManager&, float) override;
|
||||
|
|
Loading…
Reference in New Issue