mirror of https://github.com/AxioDL/metaforce.git
CScriptActorRotate: Make use of insert_or_assign in UpdateActors()
Same behavior, minus potentially avoidable default constructions that immediately get overwritten.
This commit is contained in:
parent
677ed1ce9a
commit
1049a1a590
|
@ -112,7 +112,7 @@ void CScriptActorRotate::UpdateActors(bool next, CStateManager& mgr) {
|
||||||
auto search = mgr.GetIdListForScript(conn.x8_objId);
|
auto search = mgr.GetIdListForScript(conn.x8_objId);
|
||||||
for (auto it = search.first; it != search.second; ++it) {
|
for (auto it = search.first; it != search.second; ++it) {
|
||||||
if (const TCastToConstPtr<CActor> act = mgr.ObjectById(it->second)) {
|
if (const TCastToConstPtr<CActor> act = mgr.ObjectById(it->second)) {
|
||||||
x48_actors[it->second] = act->GetTransform().getRotation();
|
x48_actors.insert_or_assign(it->second, act->GetTransform().getRotation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue