mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 02:27:42 +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:
@@ -444,11 +444,12 @@ void CScriptGunTurret::PlayAdditiveFlinchAnimation(CStateManager& mgr) {
|
||||
GetModelData()->GetAnimationData()->AddAdditiveAnimation(pair.second, 1.f, false, true);
|
||||
}
|
||||
|
||||
void CScriptGunTurret::AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const {
|
||||
void CScriptGunTurret::AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) {
|
||||
CActor::AddToRenderer(frustum, mgr);
|
||||
|
||||
if (x258_type != ETurretComponent::Gun)
|
||||
if (x258_type != ETurretComponent::Gun) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!x560_25_frozen) {
|
||||
switch (x520_state) {
|
||||
@@ -471,8 +472,9 @@ void CScriptGunTurret::AddToRenderer(const zeus::CFrustum& frustum, const CState
|
||||
case ETurretState::ExitTargeting:
|
||||
case ETurretState::Frenzy:
|
||||
g_Renderer->AddParticleGen(*x478_targettingLight);
|
||||
if (x520_state == ETurretState::Firing || x520_state == ETurretState::Frenzy)
|
||||
if (x520_state == ETurretState::Firing || x520_state == ETurretState::Frenzy) {
|
||||
g_Renderer->AddParticleGen(*x488_chargingEffect);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user