some work on zones

This commit is contained in:
aap
2020-05-06 12:23:26 +02:00
parent edd9301d7f
commit cbfc45b3f7
11 changed files with 90 additions and 86 deletions

View File

@ -1088,7 +1088,7 @@ CFileLoader::LoadObjectInstance(const char *line)
entity = new CBuilding;
entity->SetModelIndexNoCreate(id);
entity->GetMatrix() = CMatrix(xform);
entity->m_level = CTheZones::GetLevelFromPosition(entity->GetPosition());
entity->m_level = CTheZones::GetLevelFromPosition(&entity->GetPosition());
if(mi->IsSimple()){
if(mi->m_isBigBuilding)
entity->SetupBigBuilding();
@ -1105,7 +1105,7 @@ CFileLoader::LoadObjectInstance(const char *line)
CWorld::Add(entity);
if(IsGlass(entity->GetModelIndex()))
entity->bIsVisible = false;
entity->m_level = CTheZones::GetLevelFromPosition(entity->GetPosition());
entity->m_level = CTheZones::GetLevelFromPosition(&entity->GetPosition());
}
RwMatrixDestroy(xform);