mirror of https://github.com/AxioDL/metaforce.git
CScriptAreaAttributes: Brace statements where applicable
Makes the code consistent.
This commit is contained in:
parent
0bb3fcae3b
commit
bdcf6dee66
|
@ -25,8 +25,9 @@ void CScriptAreaAttributes::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||||
|
|
||||||
void CScriptAreaAttributes::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) {
|
void CScriptAreaAttributes::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) {
|
||||||
CEntity::AcceptScriptMsg(msg, objId, stateMgr);
|
CEntity::AcceptScriptMsg(msg, objId, stateMgr);
|
||||||
if (x4_areaId == kInvalidAreaId)
|
if (x4_areaId == kInvalidAreaId) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (msg == EScriptObjectMessage::InitializedInArea) {
|
if (msg == EScriptObjectMessage::InitializedInArea) {
|
||||||
CGameArea* area = stateMgr.GetWorld()->GetArea(x4_areaId);
|
CGameArea* area = stateMgr.GetWorld()->GetArea(x4_areaId);
|
||||||
|
@ -35,8 +36,9 @@ void CScriptAreaAttributes::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId
|
||||||
} else if (msg == EScriptObjectMessage::Deleted) {
|
} else if (msg == EScriptObjectMessage::Deleted) {
|
||||||
CGameArea* area = stateMgr.GetWorld()->GetArea(x4_areaId);
|
CGameArea* area = stateMgr.GetWorld()->GetArea(x4_areaId);
|
||||||
|
|
||||||
if (!area->IsPostConstructed())
|
if (!area->IsPostConstructed()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
area->SetAreaAttributes(nullptr);
|
area->SetAreaAttributes(nullptr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue