mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 23:07:43 +00:00
Various fixes
This commit is contained in:
@@ -2339,7 +2339,18 @@ void CStateManager::RemoveObject(TUniqueId uid)
|
||||
if (CEntity* ent = GetAllObjectList().GetValidObjectById(uid))
|
||||
{
|
||||
if (ent->GetEditorId() != kInvalidEditorId)
|
||||
x890_scriptIdMap.erase(ent->GetEditorId());
|
||||
{
|
||||
auto search = x890_scriptIdMap.equal_range(ent->GetEditorId());
|
||||
for (auto it = search.first; it != search.second;)
|
||||
{
|
||||
if (it->second == uid)
|
||||
{
|
||||
it = x890_scriptIdMap.erase(it);
|
||||
continue;
|
||||
}
|
||||
++it;
|
||||
}
|
||||
}
|
||||
if (ent->GetAreaIdAlways() != kInvalidAreaId)
|
||||
{
|
||||
CGameArea* area = x850_world->GetArea(ent->GetAreaIdAlways());
|
||||
|
||||
Reference in New Issue
Block a user