2
0
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:
Lioncash
2020-04-05 07:54:02 -04:00
parent 19cfb92d5d
commit cabbfcc320
79 changed files with 168 additions and 131 deletions

View File

@@ -410,12 +410,14 @@ void CScriptWater::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum)
}
}
void CScriptWater::AddToRenderer(const zeus::CFrustum& /*frustum*/, const CStateManager& mgr) const {
if (!xe4_30_outOfFrustum) {
zeus::CPlane plane(zeus::skUp, x34_transform.origin.z() + x130_bounds.max.z());
zeus::CAABox renderBounds = GetSortingBounds(mgr);
mgr.AddDrawableActorPlane(*this, plane, renderBounds);
void CScriptWater::AddToRenderer(const zeus::CFrustum& /*frustum*/, CStateManager& mgr) {
if (xe4_30_outOfFrustum) {
return;
}
const zeus::CPlane plane(zeus::skUp, x34_transform.origin.z() + x130_bounds.max.z());
const zeus::CAABox renderBounds = GetSortingBounds(mgr);
mgr.AddDrawableActorPlane(*this, plane, renderBounds);
}
void CScriptWater::Render(const CStateManager& mgr) const {