CPlasmaProjectile: Make PlayerEffectResource instances contain CAssetIds

Uses the wrapper type instead of the raw type.
This commit is contained in:
Lioncash 2020-04-12 07:29:58 -04:00
parent 976bf0d83e
commit 9e168d3497
2 changed files with 10 additions and 8 deletions

View File

@ -53,12 +53,14 @@ CPlasmaProjectile::CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, st
x51c_pulseGen = std::make_unique<CElementGen>(x50c_pulseFxDesc, CElementGen::EModelOrientationType::Normal);
x524_freezeSteamTxtr = res[0];
x528_freezeIceTxtr = res[1];
if (res[2] != UINT64_MAX)
if (res[2].IsValid()) {
x52c_visorElectric = g_SimplePool->GetObj(SObjectTag{FOURCC('ELSC'), res[2]});
if (res[3] != UINT64_MAX)
}
if (res[3].IsValid()) {
x538_visorParticle = g_SimplePool->GetObj(SObjectTag{FOURCC('PART'), res[3]});
x544_freezeSfx = CSfxManager::TranslateSFXID(res[4]);
x546_electricSfx = CSfxManager::TranslateSFXID(res[5]);
}
x544_freezeSfx = CSfxManager::TranslateSFXID(u16(res[4].Value()));
x546_electricSfx = CSfxManager::TranslateSFXID(u16(res[5].Value()));
x518_contactGen->SetGlobalScale(zeus::CVector3f(bInfo.GetContactFxScale()));
x51c_pulseGen->SetGlobalScale(zeus::CVector3f(bInfo.GetPulseFxScale()));
x518_contactGen->SetParticleEmission(false);

View File

@ -18,10 +18,10 @@
namespace urde {
class CPlasmaProjectile : public CBeamProjectile {
public:
struct PlayerEffectResoures : rstl::reserved_vector<u64, 8> {
PlayerEffectResoures(u64 a = UINT64_MAX, u64 b = UINT64_MAX, u64 c = UINT64_MAX, u64 d = UINT64_MAX,
u64 e = UINT64_MAX, u64 f = UINT64_MAX, u64 g = UINT64_MAX, u64 h = UINT64_MAX)
: rstl::reserved_vector<u64, 8>({a, b, c, d, e, f, g, h}) {}
struct PlayerEffectResoures : rstl::reserved_vector<CAssetId, 8> {
PlayerEffectResoures(CAssetId a = {}, CAssetId b = {}, CAssetId c = {}, CAssetId d = {},
CAssetId e = {}, CAssetId f = {}, CAssetId g = {}, CAssetId h = {})
: rstl::reserved_vector<CAssetId, 8>({a, b, c, d, e, f, g, h}) {}
};
private:
std::vector<TUniqueId> x468_lights;