mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 15:44:56 +00:00
All animation nodes implemented
This commit is contained in:
@@ -228,7 +228,7 @@ void CGunWeapon::Fire(bool underwater, float dt, EChargeState chargeState, const
|
||||
{
|
||||
CDamageInfo dInfo = GetDamageInfo(mgr, chargeState, chargeFactor1);
|
||||
zeus::CVector3f scale(chargeState == EChargeState::Normal ? 1.f : chargeFactor2);
|
||||
bool partialCharge = chargeState == EChargeState::Normal ? false : std::fabs(chargeFactor1 - 1.f) >= 0.00001f;
|
||||
bool partialCharge = chargeState == EChargeState::Normal ? false : !zeus::close_enough(chargeFactor1, 1.f);
|
||||
CWeapon::EProjectileAttrib attribs = CWeapon::EProjectileAttrib::ArmCannon;
|
||||
if (partialCharge)
|
||||
attribs |= CWeapon::EProjectileAttrib::PartialCharge;
|
||||
|
||||
@@ -415,17 +415,18 @@ void CPlayerGun::StopChargeSound(CStateManager& mgr)
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayerGun::ResetCharge(CStateManager& mgr, bool b1)
|
||||
void CPlayerGun::ResetCharge(CStateManager& mgr, bool resetBeam)
|
||||
{
|
||||
if (x32c_chargePhase != EChargePhase::NotCharging)
|
||||
StopChargeSound(mgr);
|
||||
|
||||
if ((x2f8_stateFlags & 0x8) != 0x8 && (x2f8_stateFlags & 0x10) != 0x10)
|
||||
{
|
||||
bool r30 = !(mgr.GetPlayer().GetMorphballTransitionState() != CPlayer::EPlayerMorphBallState::Morphed && !b1);
|
||||
if (x832_27_chargeAnimStarted || r30)
|
||||
bool doResetBeam = mgr.GetPlayer().GetMorphballTransitionState() ==
|
||||
CPlayer::EPlayerMorphBallState::Morphed || resetBeam;
|
||||
if (x832_27_chargeAnimStarted || doResetBeam)
|
||||
PlayAnim(NWeaponTypes::EGunAnimType::BasePosition, false);
|
||||
if (r30)
|
||||
if (doResetBeam)
|
||||
x72c_currentBeam->EnableSecondaryFx(CGunWeapon::ESecondaryFxType::None);
|
||||
if ((x2f8_stateFlags & 0x2) != 0x2 || x330_chargeState != EChargeState::Normal)
|
||||
{
|
||||
@@ -2559,7 +2560,7 @@ void CPlayerGun::Render(const CStateManager& mgr, const zeus::CVector3f& pos, co
|
||||
}
|
||||
|
||||
oldViewMtx = CGraphics::g_ViewMatrix;
|
||||
CGraphics::SetModelMatrix(offsetWorldXf.inverse() * oldViewMtx);
|
||||
CGraphics::SetViewPointMatrix(offsetWorldXf.inverse() * oldViewMtx);
|
||||
CGraphics::SetModelMatrix(zeus::CTransform::Identity());
|
||||
x72c_currentBeam->PostRenderGunFx(mgr, offsetWorldXf);
|
||||
if (x832_26_comboFiring && x77c_comboXferGen)
|
||||
|
||||
@@ -393,7 +393,7 @@ public:
|
||||
void SetAssistAimTransform(const zeus::CTransform& xf) { x478_assistAimXf = xf; }
|
||||
CGrappleArm& GetGrappleArm() { return *x740_grappleArm; }
|
||||
void DamageRumble(const zeus::CVector3f& location, float damage, const CStateManager& mgr);
|
||||
void ResetCharge(CStateManager& mgr, bool b1);
|
||||
void ResetCharge(CStateManager& mgr, bool resetBeam);
|
||||
void HandleBeamChange(const CFinalInput& input, CStateManager& mgr);
|
||||
void HandlePhazonBeamChange(CStateManager& mgr);
|
||||
void HandleWeaponChange(const CFinalInput& input, CStateManager& mgr);
|
||||
|
||||
@@ -94,6 +94,8 @@ void CPowerBeam::EnableSecondaryFx(ESecondaryFxType type)
|
||||
switch (type)
|
||||
{
|
||||
case ESecondaryFxType::None:
|
||||
case ESecondaryFxType::ToCombo:
|
||||
case ESecondaryFxType::CancelCharge:
|
||||
if (x1cc_enabledSecondaryEffect != ESecondaryFxType::None && x238_power2ndGen)
|
||||
x238_power2ndGen->SetParticleEmission(false);
|
||||
x1cc_enabledSecondaryEffect = ESecondaryFxType::None;
|
||||
|
||||
Reference in New Issue
Block a user