mirror of https://github.com/AxioDL/metaforce.git
CGunWeapon: Eliminate const_cast usages in DrawMuzzleFx()
We can just make the temporary variable non-const to eliminate the need for const_casts.
This commit is contained in:
parent
271ee6d8c3
commit
26a9ceab60
|
@ -298,14 +298,14 @@ void CGunWeapon::Draw(bool drawSuitArm, const CStateManager& mgr, const zeus::CT
|
|||
}
|
||||
|
||||
void CGunWeapon::DrawMuzzleFx(const CStateManager& mgr) const {
|
||||
if (const CElementGen* effect = x1a4_muzzleGenerators[x208_muzzleEffectIdx].get()) {
|
||||
if (CElementGen* const effect = x1a4_muzzleGenerators[x208_muzzleEffectIdx].get()) {
|
||||
if (x200_beamId != CPlayerState::EBeamId::Ice &&
|
||||
mgr.GetPlayerState()->GetActiveVisor(mgr) == CPlayerState::EPlayerVisor::XRay) {
|
||||
CElementGen::SetSubtractBlend(true);
|
||||
const_cast<CElementGen*>(effect)->Render();
|
||||
effect->Render();
|
||||
CElementGen::SetSubtractBlend(false);
|
||||
} else {
|
||||
const_cast<CElementGen*>(effect)->Render();
|
||||
effect->Render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue