CScriptSwitch: Brace conditionals where applicable

This commit is contained in:
Lioncash 2020-05-07 11:48:34 -04:00
parent 0fa7e0a73b
commit 79a25cab5e
1 changed files with 5 additions and 4 deletions

View File

@ -13,19 +13,20 @@ void CScriptSwitch::Accept(IVisitor& visitor) { visitor.Visit(this); }
void CScriptSwitch::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& mgr) {
if (GetActive()) {
if (msg == EScriptObjectMessage::Open)
if (msg == EScriptObjectMessage::Open) {
x34_opened = true;
else if (msg == EScriptObjectMessage::Close)
} else if (msg == EScriptObjectMessage::Close) {
x34_opened = false;
else if (msg == EScriptObjectMessage::SetToZero) {
} else if (msg == EScriptObjectMessage::SetToZero) {
if (x34_opened) {
SendScriptMsgs(EScriptObjectState::Open, mgr, EScriptObjectMessage::None);
if (x35_closeOnOpened)
x34_opened = false;
} else
} else {
SendScriptMsgs(EScriptObjectState::Closed, mgr, EScriptObjectMessage::None);
}
}
}
CEntity::AcceptScriptMsg(msg, objId, mgr);
}