diff --git a/Runtime/Weapon/CAuxWeapon.cpp b/Runtime/Weapon/CAuxWeapon.cpp index 64722caf8..6764dec90 100644 --- a/Runtime/Weapon/CAuxWeapon.cpp +++ b/Runtime/Weapon/CAuxWeapon.cpp @@ -210,19 +210,21 @@ void CAuxWeapon::CreateFlameThrower(const zeus::CTransform& xf, CStateManager& m if (x6e_flameThrowerId != kInvalidUniqueId) return; - CAssetId resInfo[] = {NWeaponTypes::get_asset_id_from_name("NFTMainFire"), - NWeaponTypes::get_asset_id_from_name("NFTMainSmoke"), - NWeaponTypes::get_asset_id_from_name("NFTSwooshCenter"), - NWeaponTypes::get_asset_id_from_name("NFTSwooshFire"), - NWeaponTypes::get_asset_id_from_name("NFTSecondarySmoke"), - NWeaponTypes::get_asset_id_from_name("NFTSecondaryFire"), - NWeaponTypes::get_asset_id_from_name("NFTSecondarySparks"), - {}}; + const std::array resInfo{ + NWeaponTypes::get_asset_id_from_name("NFTMainFire"), + NWeaponTypes::get_asset_id_from_name("NFTMainSmoke"), + NWeaponTypes::get_asset_id_from_name("NFTSwooshCenter"), + NWeaponTypes::get_asset_id_from_name("NFTSwooshFire"), + NWeaponTypes::get_asset_id_from_name("NFTSecondarySmoke"), + NWeaponTypes::get_asset_id_from_name("NFTSecondaryFire"), + NWeaponTypes::get_asset_id_from_name("NFTSecondarySparks"), + {}, + }; x6e_flameThrowerId = mgr.AllocateUniqueId(); - CNewFlameThrower* ft = new CNewFlameThrower( - x28_combos[3], "Player_FlameThrower", EWeaponType::Plasma, resInfo, xf, EMaterialTypes::Player, - CGunWeapon::GetShotDamageInfo(g_tweakPlayerGun->GetComboShotInfo(3), mgr), x6e_flameThrowerId, kInvalidAreaId, - x6c_playerId, EProjectileAttrib::None); + auto* ft = new CNewFlameThrower(x28_combos[3], "Player_FlameThrower", EWeaponType::Plasma, resInfo, xf, + EMaterialTypes::Player, + CGunWeapon::GetShotDamageInfo(g_tweakPlayerGun->GetComboShotInfo(3), mgr), + x6e_flameThrowerId, kInvalidAreaId, x6c_playerId, EProjectileAttrib::None); mgr.AddObject(ft); ft->Think(dt, mgr); ft->StartFiring(xf, mgr); diff --git a/Runtime/Weapon/CNewFlameThrower.cpp b/Runtime/Weapon/CNewFlameThrower.cpp index f2c86609f..2e8bdaac0 100644 --- a/Runtime/Weapon/CNewFlameThrower.cpp +++ b/Runtime/Weapon/CNewFlameThrower.cpp @@ -8,9 +8,9 @@ namespace urde { CNewFlameThrower::CNewFlameThrower(const TToken& desc, std::string_view name, EWeaponType wType, - const CAssetId resInfo[8], const zeus::CTransform& xf, EMaterialTypes matType, - const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner, - EProjectileAttrib attribs) + const std::array& resInfo, const zeus::CTransform& xf, + EMaterialTypes matType, const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, + TUniqueId owner, EProjectileAttrib attribs) : CGameProjectile(false, desc, name, wType, xf, matType, dInfo, uid, aid, owner, kInvalidUniqueId, attribs, false, zeus::skOne3f, {}, -1, false) , x304_mainFire(g_SimplePool->GetObj(SObjectTag{FOURCC('PART'), resInfo[0]})) diff --git a/Runtime/Weapon/CNewFlameThrower.hpp b/Runtime/Weapon/CNewFlameThrower.hpp index 953a86615..4c2353f58 100644 --- a/Runtime/Weapon/CNewFlameThrower.hpp +++ b/Runtime/Weapon/CNewFlameThrower.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -53,7 +54,7 @@ public: // NFTSecondarySparks // CNewFlameThrower(const TToken& desc, std::string_view name, EWeaponType wType, - const CAssetId resInfo[8], const zeus::CTransform& xf, EMaterialTypes matType, + const std::array& resInfo, const zeus::CTransform& xf, EMaterialTypes matType, const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner, EProjectileAttrib attribs); void StartFiring(const zeus::CTransform& xf, CStateManager& mgr); bool CanRenderAuxEffects() const { return x37c_24_renderAuxEffects; }