mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-26 02:54:14 +01:00
9b5caa190e
Mostly for Linux
23 lines
632 B
C++
23 lines
632 B
C++
#include "common.h"
|
|
|
|
#include "Building.h"
|
|
#include "Streaming.h"
|
|
#include "Pools.h"
|
|
|
|
void *CBuilding::operator new(size_t sz) throw() { return CPools::GetBuildingPool()->New(); }
|
|
void CBuilding::operator delete(void *p, size_t sz) throw() { CPools::GetBuildingPool()->Delete((CBuilding*)p); }
|
|
|
|
void
|
|
CBuilding::ReplaceWithNewModel(int32 id)
|
|
{
|
|
DeleteRwObject();
|
|
|
|
if (CModelInfo::GetModelInfo(m_modelIndex)->GetNumRefs() == 0)
|
|
CStreaming::RemoveModel(m_modelIndex);
|
|
m_modelIndex = id;
|
|
|
|
if(bIsBIGBuilding)
|
|
if(m_level == LEVEL_GENERIC || m_level == CGame::currLevel)
|
|
CStreaming::RequestModel(id, STREAMFLAGS_DONT_REMOVE);
|
|
}
|