CScriptWorldTeleporter: Unindent code in StartTransition()

We can make use of an early-return to unindent code by one level.
This commit is contained in:
Lioncash 2020-05-03 10:28:25 -04:00
parent d0233b7767
commit 40ede53949
1 changed files with 21 additions and 19 deletions

View File

@ -97,7 +97,10 @@ void CScriptWorldTeleporter::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId
} }
void CScriptWorldTeleporter::StartTransition(CStateManager& mgr) { void CScriptWorldTeleporter::StartTransition(CStateManager& mgr) {
if (!x40_25_inTransition) { if (x40_25_inTransition) {
return;
}
const auto& transMgr = mgr.WorldTransManager(); const auto& transMgr = mgr.WorldTransManager();
switch (x3c_type) { switch (x3c_type) {
case ETeleporterType::NoTransition: case ETeleporterType::NoTransition:
@ -118,7 +121,6 @@ void CScriptWorldTeleporter::StartTransition(CStateManager& mgr) {
x40_25_inTransition = true; x40_25_inTransition = true;
break; break;
} }
}
} }
} // namespace urde } // namespace urde