2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 15:47:46 +00:00

Initial working projectiles

This commit is contained in:
Jack Andersen
2018-02-11 19:30:21 -10:00
parent 547471c6ba
commit 46a4a37cc6
45 changed files with 545 additions and 166 deletions

View File

@@ -229,11 +229,11 @@ 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 : !zeus::close_enough(chargeFactor1, 1.f);
CWeapon::EProjectileAttrib attribs = CWeapon::EProjectileAttrib::ArmCannon;
EProjectileAttrib attribs = EProjectileAttrib::ArmCannon;
if (partialCharge)
attribs |= CWeapon::EProjectileAttrib::PartialCharge;
attribs |= EProjectileAttrib::PartialCharge;
if (chargeState == EChargeState::Charged)
attribs |= CWeapon::EProjectileAttrib::Charged;
attribs |= EProjectileAttrib::Charged;
CEnergyProjectile* proj = new CEnergyProjectile(true, x144_weapons[int(chargeState)], x1c0_weaponType,
xf, x1c8_playerMaterial, dInfo, mgr.AllocateUniqueId(),