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

Runtime/Weapon: Replace bitfield unions with constructor initializers

This commit is contained in:
2020-04-11 00:49:02 -04:00
parent c7ca8dc3a7
commit 22880abb7e
19 changed files with 174 additions and 171 deletions

View File

@@ -29,8 +29,8 @@ CPlasmaProjectile::CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, st
const CBeamInfo& bInfo, const zeus::CTransform& xf, EMaterialTypes matType,
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
const PlayerEffectResoures& res, bool growingBeam, EProjectileAttrib attribs)
: CBeamProjectile(wDesc, name, wType, xf, bInfo.GetLength(), bInfo.GetRadius(), bInfo.GetTravelSpeed(), matType,
dInfo, uid, aid, owner, attribs, growingBeam)
: CBeamProjectile(wDesc, name, wType, xf, bInfo.GetLength(), bInfo.GetRadius(), bInfo.GetTravelSpeed(), matType, dInfo,
uid, aid, owner, attribs, growingBeam)
, x478_beamAttributes(bInfo.GetBeamAttributes())
, x47c_lifeTime(bInfo.GetLifeTime())
, x480_pulseSpeed(bInfo.GetPulseSpeed())
@@ -38,7 +38,13 @@ CPlasmaProjectile::CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, st
, x488_expansionSpeed(bInfo.GetExpansionSpeed())
, x48c_(bInfo.GetLength() / 32.f)
, x490_innerColor(bInfo.GetInnerColor())
, x494_outerColor(bInfo.GetOuterColor()) {
, x494_outerColor(bInfo.GetOuterColor())
, x548_24_(false)
, x548_25_enableEnergyPulse(true)
, x548_26_firing(false)
, x548_27_texturesLoaded(false)
, x548_28_drawOwnerFirst(growingBeam)
, x548_29_activePlayerPhazon(false) {
x4e8_texture = g_SimplePool->GetObj(SObjectTag{FOURCC('TXTR'), bInfo.GetTextureId()});
x4f4_glowTexture = g_SimplePool->GetObj(SObjectTag{FOURCC('TXTR'), bInfo.GetGlowTextureId()});
x500_contactFxDesc = g_SimplePool->GetObj(SObjectTag{FOURCC('PART'), bInfo.GetContactFxId()});
@@ -53,8 +59,6 @@ CPlasmaProjectile::CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, st
x538_visorParticle = g_SimplePool->GetObj(SObjectTag{FOURCC('PART'), res[3]});
x544_freezeSfx = CSfxManager::TranslateSFXID(res[4]);
x546_electricSfx = CSfxManager::TranslateSFXID(res[5]);
x548_25_enableEnergyPulse = true;
x548_28_drawOwnerFirst = growingBeam;
x518_contactGen->SetGlobalScale(zeus::CVector3f(bInfo.GetContactFxScale()));
x51c_pulseGen->SetGlobalScale(zeus::CVector3f(bInfo.GetPulseFxScale()));
x518_contactGen->SetParticleEmission(false);