mirror of https://github.com/AxioDL/metaforce.git
CProjectileWeapon: Remove usages of const_cast
Now that the base Render() function was made non-const, it's trivial to apply this to the other classes like CProjectileWeapon.
This commit is contained in:
parent
a2f7527388
commit
0c1b47faf8
|
@ -201,7 +201,7 @@ void CProjectileWeapon::RenderParticles() const {
|
|||
x104_->Render();
|
||||
}
|
||||
|
||||
void CProjectileWeapon::AddToRenderer() const {
|
||||
void CProjectileWeapon::AddToRenderer() {
|
||||
if (xfc_APSMGen)
|
||||
g_Renderer->AddParticleGen(*xfc_APSMGen);
|
||||
if (x100_APS2Gen)
|
||||
|
@ -216,7 +216,7 @@ void CProjectileWeapon::AddToRenderer() const {
|
|||
g_Renderer->AddParticleGen(*x104_);
|
||||
}
|
||||
|
||||
void CProjectileWeapon::Render() const {
|
||||
void CProjectileWeapon::Render() {
|
||||
if (xf4_curFrame > xe8_lifetime || !x124_24_active || !x108_model)
|
||||
return;
|
||||
|
||||
|
@ -227,7 +227,7 @@ void CProjectileWeapon::Render() const {
|
|||
|
||||
std::vector<CLight> useLights;
|
||||
useLights.push_back(CLight::BuildLocalAmbient({}, xc8_ambientLightColor));
|
||||
const_cast<CModel&>(**x108_model).GetInstance().ActivateLights(useLights);
|
||||
(**x108_model).GetInstance().ActivateLights(useLights);
|
||||
CModelFlags flags(0, 0, 3, zeus::skWhite);
|
||||
(*x108_model)->Draw(flags);
|
||||
}
|
||||
|
|
|
@ -88,8 +88,8 @@ public:
|
|||
const zeus::CVector3f& target);
|
||||
TLockedToken<CWeaponDescription> GetWeaponDescription() const { return x4_weaponDesc; }
|
||||
void RenderParticles() const;
|
||||
virtual void AddToRenderer() const;
|
||||
virtual void Render() const;
|
||||
virtual void AddToRenderer();
|
||||
virtual void Render();
|
||||
bool IsSystemDeletable() const;
|
||||
void UpdateChildParticleSystems(float);
|
||||
void UpdatePSTranslationAndOrientation();
|
||||
|
|
Loading…
Reference in New Issue