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()) {
|
if (CObjectList* objs = mgr.GetWorld()->GetArea(aid)->GetAreaObjects()) {
|
||||||
for (CEntity* ent : *objs) {
|
for (CEntity* ent : *objs) {
|
||||||
TCastToPtr<CScriptDock> dock(ent);
|
const TCastToPtr<CScriptDock> dock2(ent);
|
||||||
if (dock && dock->GetDockId() == otherDock)
|
if (dock2 && dock2->GetDockId() == otherDock) {
|
||||||
dock->SetLoadConnected(mgr, true);
|
dock2->SetLoadConnected(mgr, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue