mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 11:47:42 +00:00
CScriptActorKeyframe: Eliminate variable shadowing
This commit is contained in:
@@ -91,10 +91,11 @@ void CScriptActorKeyframe::Think(float dt, CStateManager& mgr) {
|
||||
void CScriptActorKeyframe::UpdateEntity(TUniqueId uid, CStateManager& mgr) {
|
||||
CEntity* ent = mgr.ObjectById(uid);
|
||||
CActor* act = nullptr;
|
||||
if (TCastToPtr<CScriptActor> tmp = ent)
|
||||
act = tmp;
|
||||
else if (TCastToPtr<CScriptPlatform> tmp = ent)
|
||||
act = tmp;
|
||||
if (const TCastToPtr<CScriptActor> actor = ent) {
|
||||
act = actor.GetPtr();
|
||||
} else if (const TCastToPtr<CScriptPlatform> platform = ent) {
|
||||
act = platform.GetPtr();
|
||||
}
|
||||
|
||||
if (act) {
|
||||
if (!act->GetActive())
|
||||
|
||||
Reference in New Issue
Block a user