mirror of https://github.com/AxioDL/metaforce.git
CScriptDock: Get rid of variable shadowing
Same behavior, less bug vectors.
This commit is contained in:
parent
7fb2b6ac0b
commit
7df73b6f4c
|
@ -67,9 +67,10 @@ void CScriptDock::Think(float dt, CStateManager& mgr) {
|
|||
|
||||
if (CObjectList* objs = mgr.GetWorld()->GetArea(aid)->GetAreaObjects()) {
|
||||
for (CEntity* ent : *objs) {
|
||||
TCastToPtr<CScriptDock> dock(ent);
|
||||
if (dock && dock->GetDockId() == otherDock)
|
||||
dock->SetLoadConnected(mgr, true);
|
||||
const TCastToPtr<CScriptDock> dock2(ent);
|
||||
if (dock2 && dock2->GetDockId() == otherDock) {
|
||||
dock2->SetLoadConnected(mgr, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue