Added BuildModel call to AddObject to ensure required model/animation data is loaded when object list is constructed, not on first use.
This was SVN commit r244.
This commit is contained in:
parent
256436af40
commit
054d210303
@ -36,7 +36,10 @@ void CObjectManager::AddObjectType(const char* name)
|
||||
void CObjectManager::AddObject(CObjectEntry* object,int type)
|
||||
{
|
||||
assert((uint)type<m_ObjectTypes.size());
|
||||
// build the model now to load the required model/animations from it
|
||||
if (object->BuildModel()) {
|
||||
m_ObjectTypes[type].m_Objects.push_back(object);
|
||||
}
|
||||
}
|
||||
|
||||
void CObjectManager::DeleteObject(CObjectEntry* entry)
|
||||
|
Loading…
Reference in New Issue
Block a user