CActorContraption: Make use of structured bindings where applicable

Same behavior, but with better names than `first` or `second`.
This commit is contained in:
Lioncash 2020-03-20 23:11:16 -04:00
parent 93be0fbc72
commit 0cc8e76d64
1 changed files with 5 additions and 4 deletions

View File

@ -53,11 +53,12 @@ void MP1::CActorContraption::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId
void MP1::CActorContraption::Think(float dt, CStateManager& mgr) { void MP1::CActorContraption::Think(float dt, CStateManager& mgr) {
CScriptActor::Think(dt, mgr); CScriptActor::Think(dt, mgr);
for (const std::pair<TUniqueId, std::string>& uid : x2e8_children) { for (const auto& [uid, name] : x2e8_children) {
CFlameThrower* act = static_cast<CFlameThrower*>(mgr.ObjectById(uid.first)); auto* act = static_cast<CFlameThrower*>(mgr.ObjectById(uid));
if (act && act->GetActive()) if (act && act->GetActive()) {
act->SetTransform(x34_transform * GetScaledLocatorTransform(uid.second), dt); act->SetTransform(x34_transform * GetScaledLocatorTransform(name), dt);
}
} }
} }