mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-11 20:24:01 +00:00
CActor: Make AddToRenderer() non-const
This member function alters instance state in a few implementations, so it shouldn't be made const. The state manager parameter also shouldn't be const. Retrieved data from the post constructed instance is further modified in some implementations. This removes the constness on this parameter in order to fix more const_cast usages in a follow-up change.
This commit is contained in:
@@ -1570,13 +1570,14 @@ void CPatterned::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) {
|
||||
CActor::PreRender(mgr, frustum);
|
||||
}
|
||||
|
||||
void CPatterned::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
||||
void CPatterned::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||
if (x402_29_drawParticles) {
|
||||
if (x64_modelData && !x64_modelData->IsNull()) {
|
||||
int mask, target;
|
||||
mgr.GetCharacterRenderMaskAndTarget(x402_31_thawed, mask, target);
|
||||
if (CAnimData* aData = x64_modelData->GetAnimationData())
|
||||
if (CAnimData* aData = x64_modelData->GetAnimationData()) {
|
||||
aData->GetParticleDB().AddToRendererClippedMasked(frustum, mask, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
CActor::AddToRenderer(frustum, mgr);
|
||||
|
||||
Reference in New Issue
Block a user