mirror of https://github.com/AxioDL/metaforce.git
CScriptRipple: Brace conditionals where applicable
This commit is contained in:
parent
2bf190048d
commit
1315189990
|
@ -14,23 +14,27 @@ CScriptRipple::CScriptRipple(TUniqueId uid, std::string_view name, const CEntity
|
||||||
void CScriptRipple::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
void CScriptRipple::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||||
|
|
||||||
void CScriptRipple::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) {
|
void CScriptRipple::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) {
|
||||||
if (msg == EScriptObjectMessage::Play) {
|
if (msg != EScriptObjectMessage::Play) {
|
||||||
if (!GetActive())
|
CEntity::AcceptScriptMsg(msg, uid, mgr);
|
||||||
return;
|
|
||||||
|
|
||||||
for (const SConnection& conn : x20_conns) {
|
|
||||||
if (conn.x0_state != EScriptObjectState::Active || conn.x4_msg != EScriptObjectMessage::Next)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
auto search = mgr.GetIdListForScript(conn.x8_objId);
|
|
||||||
for (auto it = search.first; it != search.second; ++it) {
|
|
||||||
if (TCastToPtr<CScriptWater> water = mgr.ObjectById(it->second))
|
|
||||||
water->GetFluidPlane().AddRipple(x34_magnitude, GetUniqueId(), x38_center, *water, mgr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CEntity::AcceptScriptMsg(msg, uid, mgr);
|
|
||||||
|
if (!GetActive()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const SConnection& conn : x20_conns) {
|
||||||
|
if (conn.x0_state != EScriptObjectState::Active || conn.x4_msg != EScriptObjectMessage::Next) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto search = mgr.GetIdListForScript(conn.x8_objId);
|
||||||
|
for (auto it = search.first; it != search.second; ++it) {
|
||||||
|
if (const TCastToPtr<CScriptWater> water = mgr.ObjectById(it->second)) {
|
||||||
|
water->GetFluidPlane().AddRipple(x34_magnitude, GetUniqueId(), x38_center, *water, mgr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} // namespace urde
|
} // namespace urde
|
||||||
|
|
Loading…
Reference in New Issue