mirror of https://github.com/AxioDL/metaforce.git
RuntimeCommon: Const qualify auto references where source is const
Marks references that would be deduced as const automatically with const to be explicit to the reader.
This commit is contained in:
parent
8e77d6175c
commit
4b5074b298
|
@ -106,24 +106,27 @@ void CAnimSourceReaderBase::UpdatePOIStates() {
|
||||||
const std::vector<CSoundPOINode>& soundNodes = x4_sourceInfo->GetSoundPOIStream();
|
const std::vector<CSoundPOINode>& soundNodes = x4_sourceInfo->GetSoundPOIStream();
|
||||||
|
|
||||||
while (x14_passedBoolCount < boolNodes.size() && boolNodes[x14_passedBoolCount].GetTime() <= xc_curTime) {
|
while (x14_passedBoolCount < boolNodes.size() && boolNodes[x14_passedBoolCount].GetTime() <= xc_curTime) {
|
||||||
auto& node = boolNodes[x14_passedBoolCount];
|
const auto& node = boolNodes[x14_passedBoolCount];
|
||||||
if (node.GetIndex() >= 0)
|
if (node.GetIndex() >= 0) {
|
||||||
x24_boolStates[node.GetIndex()].second = node.GetValue();
|
x24_boolStates[node.GetIndex()].second = node.GetValue();
|
||||||
|
}
|
||||||
++x14_passedBoolCount;
|
++x14_passedBoolCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (x18_passedIntCount < int32Nodes.size() && int32Nodes[x18_passedIntCount].GetTime() <= xc_curTime) {
|
while (x18_passedIntCount < int32Nodes.size() && int32Nodes[x18_passedIntCount].GetTime() <= xc_curTime) {
|
||||||
auto& node = int32Nodes[x18_passedIntCount];
|
const auto& node = int32Nodes[x18_passedIntCount];
|
||||||
if (node.GetIndex() >= 0)
|
if (node.GetIndex() >= 0) {
|
||||||
x34_int32States[node.GetIndex()].second = node.GetValue();
|
x34_int32States[node.GetIndex()].second = node.GetValue();
|
||||||
|
}
|
||||||
++x18_passedIntCount;
|
++x18_passedIntCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (x1c_passedParticleCount < particleNodes.size() &&
|
while (x1c_passedParticleCount < particleNodes.size() &&
|
||||||
particleNodes[x1c_passedParticleCount].GetTime() <= xc_curTime) {
|
particleNodes[x1c_passedParticleCount].GetTime() <= xc_curTime) {
|
||||||
auto& node = particleNodes[x1c_passedParticleCount];
|
const auto& node = particleNodes[x1c_passedParticleCount];
|
||||||
if (node.GetIndex() >= 0)
|
if (node.GetIndex() >= 0) {
|
||||||
x44_particleStates[node.GetIndex()].second = node.GetParticleData().GetParentedMode();
|
x44_particleStates[node.GetIndex()].second = node.GetParticleData().GetParentedMode();
|
||||||
|
}
|
||||||
++x1c_passedParticleCount;
|
++x1c_passedParticleCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,11 @@ void CAnimTreeTweenBase::VGetSegStatementSet(const CSegIdList& list, CSegStateme
|
||||||
if (w >= 1.f) {
|
if (w >= 1.f) {
|
||||||
x18_b->VGetSegStatementSet(list, setOut);
|
x18_b->VGetSegStatementSet(list, setOut);
|
||||||
} else if (sStack > 3) {
|
} else if (sStack > 3) {
|
||||||
auto& n = w > 0.5f ? x18_b : x14_a;
|
const auto& n = w > 0.5f ? x18_b : x14_a;
|
||||||
auto ptr = n->GetBestUnblendedChild();
|
auto ptr = n->GetBestUnblendedChild();
|
||||||
if (!ptr)
|
if (!ptr) {
|
||||||
ptr = n;
|
ptr = n;
|
||||||
|
}
|
||||||
ptr->VGetSegStatementSet(list, setOut);
|
ptr->VGetSegStatementSet(list, setOut);
|
||||||
} else {
|
} else {
|
||||||
CSegStatementSet setA, setB;
|
CSegStatementSet setA, setB;
|
||||||
|
@ -61,7 +62,7 @@ void CAnimTreeTweenBase::VGetSegStatementSet(const CSegIdList& list, CSegStateme
|
||||||
if (w >= 1.f) {
|
if (w >= 1.f) {
|
||||||
x18_b->VGetSegStatementSet(list, setOut, time);
|
x18_b->VGetSegStatementSet(list, setOut, time);
|
||||||
} else if (sStack > 3) {
|
} else if (sStack > 3) {
|
||||||
auto& n = w > 0.5f ? x18_b : x14_a;
|
const auto& n = w > 0.5f ? x18_b : x14_a;
|
||||||
n->GetBestUnblendedChild()->VGetSegStatementSet(list, setOut, time);
|
n->GetBestUnblendedChild()->VGetSegStatementSet(list, setOut, time);
|
||||||
} else {
|
} else {
|
||||||
CSegStatementSet setA, setB;
|
CSegStatementSet setA, setB;
|
||||||
|
|
|
@ -27,12 +27,13 @@ void CMetaAnimRandom::GetUniquePrimitives(std::set<CPrimitive>& primsOut) const
|
||||||
|
|
||||||
std::shared_ptr<CAnimTreeNode> CMetaAnimRandom::VGetAnimationTree(const CAnimSysContext& animSys,
|
std::shared_ptr<CAnimTreeNode> CMetaAnimRandom::VGetAnimationTree(const CAnimSysContext& animSys,
|
||||||
const CMetaAnimTreeBuildOrders& orders) const {
|
const CMetaAnimTreeBuildOrders& orders) const {
|
||||||
u32 r = animSys.x8_random->Range(1, 100);
|
const u32 r = animSys.x8_random->Range(1, 100);
|
||||||
const std::pair<std::shared_ptr<IMetaAnim>, u32>* useRd = nullptr;
|
const std::pair<std::shared_ptr<IMetaAnim>, u32>* useRd = nullptr;
|
||||||
for (auto& rd : x4_randomData) {
|
for (const auto& rd : x4_randomData) {
|
||||||
useRd = &rd;
|
useRd = &rd;
|
||||||
if (r <= rd.second)
|
if (r <= rd.second) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return useRd->first->GetAnimationTree(animSys, orders);
|
return useRd->first->GetAnimationTree(animSys, orders);
|
||||||
|
|
|
@ -205,36 +205,39 @@ void CParticleDatabase::Update(float dt, const CPoseAsTransforms& pose, const CC
|
||||||
}
|
}
|
||||||
|
|
||||||
void CParticleDatabase::RenderParticleGenMap(const std::map<std::string, std::unique_ptr<CParticleGenInfo>>& map) {
|
void CParticleDatabase::RenderParticleGenMap(const std::map<std::string, std::unique_ptr<CParticleGenInfo>>& map) {
|
||||||
for (auto& e : map) {
|
for (const auto& e : map) {
|
||||||
e.second->Render();
|
e.second->Render();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CParticleDatabase::RenderParticleGenMapMasked(const std::map<std::string, std::unique_ptr<CParticleGenInfo>>& map,
|
void CParticleDatabase::RenderParticleGenMapMasked(const std::map<std::string, std::unique_ptr<CParticleGenInfo>>& map,
|
||||||
int mask, int target) {
|
int mask, int target) {
|
||||||
for (auto& e : map) {
|
for (const auto& e : map) {
|
||||||
if ((e.second->GetFlags() & mask) == target)
|
if ((e.second->GetFlags() & mask) == target) {
|
||||||
e.second->Render();
|
e.second->Render();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CParticleDatabase::AddToRendererClippedParticleGenMap(
|
void CParticleDatabase::AddToRendererClippedParticleGenMap(
|
||||||
const std::map<std::string, std::unique_ptr<CParticleGenInfo>>& map, const zeus::CFrustum& frustum) {
|
const std::map<std::string, std::unique_ptr<CParticleGenInfo>>& map, const zeus::CFrustum& frustum) {
|
||||||
for (auto& e : map) {
|
for (const auto& e : map) {
|
||||||
auto bounds = e.second->GetBounds();
|
const auto bounds = e.second->GetBounds();
|
||||||
if (bounds && frustum.aabbFrustumTest(*bounds))
|
if (bounds && frustum.aabbFrustumTest(*bounds)) {
|
||||||
e.second->AddToRenderer();
|
e.second->AddToRenderer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CParticleDatabase::AddToRendererClippedParticleGenMapMasked(
|
void CParticleDatabase::AddToRendererClippedParticleGenMapMasked(
|
||||||
const std::map<std::string, std::unique_ptr<CParticleGenInfo>>& map, const zeus::CFrustum& frustum, int mask,
|
const std::map<std::string, std::unique_ptr<CParticleGenInfo>>& map, const zeus::CFrustum& frustum, int mask,
|
||||||
int target) {
|
int target) {
|
||||||
for (auto& e : map) {
|
for (const auto& e : map) {
|
||||||
if ((e.second->GetFlags() & mask) == target) {
|
if ((e.second->GetFlags() & mask) == target) {
|
||||||
auto bounds = e.second->GetBounds();
|
const auto bounds = e.second->GetBounds();
|
||||||
if (bounds && frustum.aabbFrustumTest(*bounds))
|
if (bounds && frustum.aabbFrustumTest(*bounds)) {
|
||||||
e.second->AddToRenderer();
|
e.second->AddToRenderer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -340,12 +340,13 @@ CBooModel::ModelInstance* CBooModel::PushNewModelInstance(int sharedLayoutBuf) {
|
||||||
};
|
};
|
||||||
if (!g_DummyTextures) {
|
if (!g_DummyTextures) {
|
||||||
for (const auto& ch : mat.chunks) {
|
for (const auto& ch : mat.chunks) {
|
||||||
if (auto pass = ch.get_if<MaterialSet::Material::PASS>()) {
|
if (const auto* const pass = ch.get_if<MaterialSet::Material::PASS>()) {
|
||||||
auto search = x1c_textures.find(pass->texId.toUint32());
|
auto search = x1c_textures.find(pass->texId.toUint32());
|
||||||
boo::ObjToken<boo::ITexture> btex;
|
boo::ObjToken<boo::ITexture> btex;
|
||||||
if (search != x1c_textures.cend() && (btex = search->second.GetObj()->GetBooTexture()))
|
if (search != x1c_textures.cend() && (btex = search->second.GetObj()->GetBooTexture())) {
|
||||||
texs[MaterialSet::Material::TexMapIdx(pass->type)] = btex;
|
texs[MaterialSet::Material::TexMapIdx(pass->type)] = btex;
|
||||||
} else if (auto pass = ch.get_if<MaterialSet::Material::CLR>()) {
|
}
|
||||||
|
} else if (const auto* const pass = ch.get_if<MaterialSet::Material::CLR>()) {
|
||||||
boo::ObjToken<boo::ITexture> btex = g_Renderer->GetColorTexture(zeus::CColor(pass->color));
|
boo::ObjToken<boo::ITexture> btex = g_Renderer->GetColorTexture(zeus::CColor(pass->color));
|
||||||
texs[MaterialSet::Material::TexMapIdx(pass->type)] = btex;
|
texs[MaterialSet::Material::TexMapIdx(pass->type)] = btex;
|
||||||
}
|
}
|
||||||
|
@ -424,7 +425,7 @@ void CBooModel::MakeTexturesFromMats(const MaterialSet& matSet,
|
||||||
IObjectStore& store) {
|
IObjectStore& store) {
|
||||||
for (const auto& mat : matSet.materials) {
|
for (const auto& mat : matSet.materials) {
|
||||||
for (const auto& chunk : mat.chunks) {
|
for (const auto& chunk : mat.chunks) {
|
||||||
if (auto pass = chunk.get_if<MaterialSet::Material::PASS>()) {
|
if (const auto* const pass = chunk.get_if<MaterialSet::Material::PASS>()) {
|
||||||
toksOut.emplace(std::make_pair(pass->texId.toUint32(), store.GetObj({SBIG('TXTR'), pass->texId.toUint32()})));
|
toksOut.emplace(std::make_pair(pass->texId.toUint32(), store.GetObj({SBIG('TXTR'), pass->texId.toUint32()})));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -485,8 +486,8 @@ bool CBooModel::TryLockTextures() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allLoad) {
|
if (allLoad) {
|
||||||
for (auto& pipeline : *m_pipelines) {
|
for (const auto& pipeline : *m_pipelines) {
|
||||||
for (auto& subpipeline : *pipeline.second) {
|
for (const auto& subpipeline : *pipeline.second) {
|
||||||
if (!subpipeline->isReady()) {
|
if (!subpipeline->isReady()) {
|
||||||
allLoad = false;
|
allLoad = false;
|
||||||
break;
|
break;
|
||||||
|
@ -682,7 +683,7 @@ void CBooModel::WarmupDrawSurface(const CBooSurface& surf) const {
|
||||||
return;
|
return;
|
||||||
const ModelInstance& inst = m_instances[m_uniUpdateCount - 1];
|
const ModelInstance& inst = m_instances[m_uniUpdateCount - 1];
|
||||||
|
|
||||||
for (auto& binding : inst.m_shaderDataBindings[surf.selfIdx]) {
|
for (const auto& binding : inst.m_shaderDataBindings[surf.selfIdx]) {
|
||||||
CGraphics::SetShaderDataBinding(binding);
|
CGraphics::SetShaderDataBinding(binding);
|
||||||
CGraphics::DrawArrayIndexed(surf.m_data.idxStart, std::min(u32(3), surf.m_data.idxCount));
|
CGraphics::DrawArrayIndexed(surf.m_data.idxStart, std::min(u32(3), surf.m_data.idxCount));
|
||||||
}
|
}
|
||||||
|
@ -865,7 +866,7 @@ void CBooModel::UVAnimationBuffer::Update(u8*& bufOut, const MaterialSet* matSet
|
||||||
}
|
}
|
||||||
u8* bufOrig = bufOut;
|
u8* bufOrig = bufOut;
|
||||||
for (const auto& chunk : mat.chunks) {
|
for (const auto& chunk : mat.chunks) {
|
||||||
if (auto pass = chunk.get_if<MaterialSet::Material::PASS>()) {
|
if (const auto* const pass = chunk.get_if<MaterialSet::Material::PASS>()) {
|
||||||
ProcessAnimation(bufOut, *pass);
|
ProcessAnimation(bufOut, *pass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1289,14 +1290,14 @@ bool CModel::IsLoaded(int shaderIdx) const {
|
||||||
size_t CModel::GetPoolVertexOffset(size_t idx) const { return m_hmdlMeta.vertStride * idx; }
|
size_t CModel::GetPoolVertexOffset(size_t idx) const { return m_hmdlMeta.vertStride * idx; }
|
||||||
|
|
||||||
zeus::CVector3f CModel::GetPoolVertex(size_t idx) const {
|
zeus::CVector3f CModel::GetPoolVertex(size_t idx) const {
|
||||||
auto* floats = reinterpret_cast<const float*>(m_dynamicVertexData.get() + GetPoolVertexOffset(idx));
|
const auto* floats = reinterpret_cast<const float*>(m_dynamicVertexData.get() + GetPoolVertexOffset(idx));
|
||||||
return {floats};
|
return {floats};
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t CModel::GetPoolNormalOffset(size_t idx) const { return m_hmdlMeta.vertStride * idx + 12; }
|
size_t CModel::GetPoolNormalOffset(size_t idx) const { return m_hmdlMeta.vertStride * idx + 12; }
|
||||||
|
|
||||||
zeus::CVector3f CModel::GetPoolNormal(size_t idx) const {
|
zeus::CVector3f CModel::GetPoolNormal(size_t idx) const {
|
||||||
auto* floats = reinterpret_cast<const float*>(m_dynamicVertexData.get() + GetPoolNormalOffset(idx));
|
const auto* floats = reinterpret_cast<const float*>(m_dynamicVertexData.get() + GetPoolNormalOffset(idx));
|
||||||
return {floats};
|
return {floats};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,13 +151,13 @@ void CRainSplashGenerator::Update(float dt, CStateManager& mgr) {
|
||||||
|
|
||||||
u32 CRainSplashGenerator::GetNextBestPt(u32 pt, const std::vector<std::pair<zeus::CVector3f, zeus::CVector3f>>& vn,
|
u32 CRainSplashGenerator::GetNextBestPt(u32 pt, const std::vector<std::pair<zeus::CVector3f, zeus::CVector3f>>& vn,
|
||||||
CRandom16& rand, float minZ) {
|
CRandom16& rand, float minZ) {
|
||||||
auto& refVert = vn[pt];
|
const auto& refVert = vn[pt];
|
||||||
float maxDist = 0.f;
|
float maxDist = 0.f;
|
||||||
u32 nextPt = pt;
|
u32 nextPt = pt;
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
auto idx = u32(rand.Range(0, int(vn.size() - 1)));
|
const auto idx = u32(rand.Range(0, int(vn.size() - 1)));
|
||||||
auto& vert = vn[idx];
|
const auto& vert = vn[idx];
|
||||||
float distSq = (refVert.first - vert.first).magSquared();
|
const float distSq = (refVert.first - vert.first).magSquared();
|
||||||
if (distSq > maxDist && vert.second.dot(zeus::skUp) >= 0.f &&
|
if (distSq > maxDist && vert.second.dot(zeus::skUp) >= 0.f &&
|
||||||
(vert.first.z() <= 0.f || vert.first.z() > minZ)) {
|
(vert.first.z() <= 0.f || vert.first.z() > minZ)) {
|
||||||
nextPt = idx;
|
nextPt = idx;
|
||||||
|
|
|
@ -289,7 +289,7 @@ void CMFGameLoader::MakeLoadDependencyList() {
|
||||||
static constexpr std::array loadDepPAKs{"TestAnim", "SamusGun", "SamGunFx"};
|
static constexpr std::array loadDepPAKs{"TestAnim", "SamusGun", "SamGunFx"};
|
||||||
|
|
||||||
std::vector<SObjectTag> tags;
|
std::vector<SObjectTag> tags;
|
||||||
for (const auto pak : loadDepPAKs) {
|
for (const auto* const pak : loadDepPAKs) {
|
||||||
g_ResFactory->GetTagListForFile(pak, tags);
|
g_ResFactory->GetTagListForFile(pak, tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -248,10 +248,10 @@ void CElitePirate::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CSta
|
||||||
|
|
||||||
void CElitePirate::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) {
|
void CElitePirate::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) {
|
||||||
CPatterned::PreRender(mgr, frustum);
|
CPatterned::PreRender(mgr, frustum);
|
||||||
auto modelData = GetModelData();
|
auto* modelData = GetModelData();
|
||||||
x6f8_boneTracking.PreRender(mgr, *modelData->GetAnimationData(), GetTransform(), modelData->GetScale(),
|
x6f8_boneTracking.PreRender(mgr, *modelData->GetAnimationData(), GetTransform(), modelData->GetScale(),
|
||||||
*x450_bodyController);
|
*x450_bodyController);
|
||||||
auto numMaterialSets = modelData->GetNumMaterialSets();
|
const auto numMaterialSets = modelData->GetNumMaterialSets();
|
||||||
xb4_drawFlags.x1_matSetIdx =
|
xb4_drawFlags.x1_matSetIdx =
|
||||||
numMaterialSets - 1 < x7cc_activeMaterialSet ? numMaterialSets - 1 : x7cc_activeMaterialSet;
|
numMaterialSets - 1 < x7cc_activeMaterialSet ? numMaterialSets - 1 : x7cc_activeMaterialSet;
|
||||||
}
|
}
|
||||||
|
@ -757,7 +757,7 @@ void CElitePirate::SetupHealthInfo(CStateManager& mgr) {
|
||||||
x7b4_hp = health->GetHP();
|
x7b4_hp = health->GetHP();
|
||||||
if (HasWeakPointHead()) {
|
if (HasWeakPointHead()) {
|
||||||
if (TCastToPtr<CCollisionActor> actor = mgr.ObjectById(x770_collisionHeadId)) {
|
if (TCastToPtr<CCollisionActor> actor = mgr.ObjectById(x770_collisionHeadId)) {
|
||||||
auto actHealth = actor->HealthInfo(mgr);
|
auto* actHealth = actor->HealthInfo(mgr);
|
||||||
actHealth->SetHP(health->GetHP());
|
actHealth->SetHP(health->GetHP());
|
||||||
actHealth->SetKnockbackResistance(health->GetKnockbackResistance());
|
actHealth->SetKnockbackResistance(health->GetKnockbackResistance());
|
||||||
actor->SetDamageVulnerability(x56c_vulnerability);
|
actor->SetDamageVulnerability(x56c_vulnerability);
|
||||||
|
@ -940,13 +940,15 @@ void CElitePirate::CreateEnergyAbsorb(CStateManager& mgr, const zeus::CTransform
|
||||||
|
|
||||||
void CElitePirate::SetupLauncherHealthInfo(CStateManager& mgr, TUniqueId uid) {
|
void CElitePirate::SetupLauncherHealthInfo(CStateManager& mgr, TUniqueId uid) {
|
||||||
const CHealthInfo* const health = HealthInfo(mgr);
|
const CHealthInfo* const health = HealthInfo(mgr);
|
||||||
if (uid != kInvalidUniqueId) {
|
if (uid == kInvalidUniqueId) {
|
||||||
if (TCastToPtr<CCollisionActor> actor = mgr.ObjectById(uid)) {
|
return;
|
||||||
auto actHealth = actor->HealthInfo(mgr);
|
}
|
||||||
actHealth->SetHP(x5d8_data.GetLauncherHP());
|
|
||||||
actHealth->SetKnockbackResistance(health->GetKnockbackResistance());
|
if (const TCastToPtr<CCollisionActor> actor = mgr.ObjectById(uid)) {
|
||||||
actor->SetDamageVulnerability(x56c_vulnerability);
|
auto* actHealth = actor->HealthInfo(mgr);
|
||||||
}
|
actHealth->SetHP(x5d8_data.GetLauncherHP());
|
||||||
|
actHealth->SetKnockbackResistance(health->GetKnockbackResistance());
|
||||||
|
actor->SetDamageVulnerability(x56c_vulnerability);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -954,7 +956,7 @@ void CElitePirate::SetLauncherActive(CStateManager& mgr, bool val, TUniqueId uid
|
||||||
if (uid == kInvalidUniqueId) {
|
if (uid == kInvalidUniqueId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (auto entity = mgr.ObjectById(uid)) {
|
if (auto* entity = mgr.ObjectById(uid)) {
|
||||||
mgr.SendScriptMsg(entity, GetUniqueId(), val ? EScriptObjectMessage::Start : EScriptObjectMessage::Stop);
|
mgr.SendScriptMsg(entity, GetUniqueId(), val ? EScriptObjectMessage::Start : EScriptObjectMessage::Stop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,9 +162,9 @@ void CPhazonHealingNodule::UpdateParticleElectric(CStateManager& mgr) {
|
||||||
if (!x57c_particleElectric) {
|
if (!x57c_particleElectric) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (auto entity = static_cast<const CPatterned*>(mgr.GetObjectById(x56e_connId))) {
|
if (auto* entity = static_cast<const CPatterned*>(mgr.GetObjectById(x56e_connId))) {
|
||||||
auto electricityLctrXf = GetLctrTransform("Electricity_LCTR"sv);
|
const auto electricityLctrXf = GetLctrTransform("Electricity_LCTR"sv);
|
||||||
auto actorLctrXf = entity->GetLctrTransform(x58c_actorLctr);
|
const auto actorLctrXf = entity->GetLctrTransform(x58c_actorLctr);
|
||||||
x57c_particleElectric->SetOverrideIPos(electricityLctrXf.origin);
|
x57c_particleElectric->SetOverrideIPos(electricityLctrXf.origin);
|
||||||
x57c_particleElectric->SetOverrideFPos(actorLctrXf.origin);
|
x57c_particleElectric->SetOverrideFPos(actorLctrXf.origin);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue