mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 06:27:43 +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:
@@ -33,9 +33,10 @@ void CScriptVisorFlare::PreRender(CStateManager& stateMgr, const zeus::CFrustum&
|
||||
x11c_notInRenderLast = !stateMgr.RenderLast(x8_uid);
|
||||
}
|
||||
|
||||
void CScriptVisorFlare::AddToRenderer(const zeus::CFrustum&, const CStateManager& stateMgr) const {
|
||||
if (x11c_notInRenderLast)
|
||||
void CScriptVisorFlare::AddToRenderer(const zeus::CFrustum&, CStateManager& stateMgr) {
|
||||
if (x11c_notInRenderLast) {
|
||||
EnsureRendered(stateMgr, stateMgr.GetPlayer().GetTranslation(), GetSortingBounds(stateMgr));
|
||||
}
|
||||
}
|
||||
|
||||
void CScriptVisorFlare::Render(const CStateManager& stateMgr) const { xe8_flare.Render(GetTranslation(), stateMgr); }
|
||||
|
||||
Reference in New Issue
Block a user