mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:07:42 +00:00
CElementGen: Make GetSystemCount() a const member function
This doesn't modify internal member state, so this can be made a const member function.
This commit is contained in:
@@ -786,16 +786,17 @@ void CElementGen::BuildParticleSystemBounds() {
|
||||
x2f0_systemBounds.accumulateBounds(aabb);
|
||||
}
|
||||
|
||||
u32 CElementGen::GetSystemCount() {
|
||||
u32 CElementGen::GetSystemCount() const {
|
||||
u32 ret = 0;
|
||||
for (const std::unique_ptr<CParticleGen>& child : x290_activePartChildren) {
|
||||
if (child->Get4CharId() == FOURCC('PART'))
|
||||
ret += static_cast<CElementGen&>(*child).GetSystemCount();
|
||||
else
|
||||
if (child->Get4CharId() == FOURCC('PART')) {
|
||||
ret += static_cast<const CElementGen&>(*child).GetSystemCount();
|
||||
} else {
|
||||
ret += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return (ret + (x25c_activeParticleCount != 0));
|
||||
return ret + (x25c_activeParticleCount != 0);
|
||||
}
|
||||
|
||||
void CElementGen::Render(const CActorLights* actorLights) {
|
||||
|
||||
Reference in New Issue
Block a user