mirror of https://github.com/AxioDL/metaforce.git
Minor fixes from decomp
This commit is contained in:
parent
84724906a2
commit
d180c253d1
|
@ -275,6 +275,9 @@ void CChozoGhost::DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node,
|
||||||
LaunchProjectile(xf, mgr, 5, EProjectileAttrib::DamageFalloff | EProjectileAttrib::StaticInterference, true,
|
LaunchProjectile(xf, mgr, 5, EProjectileAttrib::DamageFalloff | EProjectileAttrib::StaticInterference, true,
|
||||||
{x640_projectileVisor}, x650_sound_ProjectileVisor, false, zeus::skOne3f);
|
{x640_projectileVisor}, x650_sound_ProjectileVisor, false, zeus::skOne3f);
|
||||||
if (proj) {
|
if (proj) {
|
||||||
|
if (GetProjectileInfo()->GetProjectileSpeed() > 0.f) {
|
||||||
|
proj->SetDamageFalloffSpeed(80.f / GetProjectileInfo()->GetProjectileSpeed());
|
||||||
|
}
|
||||||
proj->AddAttrib(EProjectileAttrib::BigStrike);
|
proj->AddAttrib(EProjectileAttrib::BigStrike);
|
||||||
proj->SetDamageDuration(x62c_);
|
proj->SetDamageDuration(x62c_);
|
||||||
proj->AddAttrib(EProjectileAttrib::StaticInterference);
|
proj->AddAttrib(EProjectileAttrib::StaticInterference);
|
||||||
|
|
|
@ -97,4 +97,11 @@ void CWeapon::FluidFXThink(EFluidState state, CScriptWater& water, CStateManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CWeapon::SetDamageFalloffSpeed(float d) {
|
||||||
|
if (d <= 0.f) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
x14c_damageFalloffSpeed = 1.f / d;
|
||||||
|
}
|
||||||
} // namespace metaforce
|
} // namespace metaforce
|
||||||
|
|
|
@ -50,5 +50,7 @@ public:
|
||||||
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
||||||
const CWeaponMode&, EProjectileAttrib) const override;
|
const CWeaponMode&, EProjectileAttrib) const override;
|
||||||
void FluidFXThink(EFluidState state, CScriptWater& water, CStateManager& mgr) override;
|
void FluidFXThink(EFluidState state, CScriptWater& water, CStateManager& mgr) override;
|
||||||
|
|
||||||
|
void SetDamageFalloffSpeed(float d);
|
||||||
};
|
};
|
||||||
} // namespace metaforce
|
} // namespace metaforce
|
||||||
|
|
|
@ -25,11 +25,14 @@ public:
|
||||||
CAiTrigger* GetAnd() const { return x10_andTrig; }
|
CAiTrigger* GetAnd() const { return x10_andTrig; }
|
||||||
CAiState* GetState() const { return x14_state; }
|
CAiState* GetState() const { return x14_state; }
|
||||||
bool CallFunc(CStateManager& mgr, CAi& ai) const {
|
bool CallFunc(CStateManager& mgr, CAi& ai) const {
|
||||||
|
bool ret = true;
|
||||||
if (x0_func) {
|
if (x0_func) {
|
||||||
bool ret = (ai.*x0_func)(mgr, xc_arg);
|
ret = (ai.*x0_func)(mgr, xc_arg);
|
||||||
return x18_lNot == !ret;
|
if (x18_lNot) {
|
||||||
|
ret = !ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Setup(CAiTriggerFunc func, bool lnot, float arg, CAiTrigger* andTrig) {
|
void Setup(CAiTriggerFunc func, bool lnot, float arg, CAiTrigger* andTrig) {
|
||||||
|
|
Loading…
Reference in New Issue