Maybe fixed nasty memory corruption bug.

This was SVN commit r2254.
This commit is contained in:
Ykkrosh
2005-05-09 02:29:33 +00:00
parent f6e864c9f6
commit bcc4aea8dc
3 changed files with 17 additions and 3 deletions
+13
View File
@@ -28,6 +28,19 @@ CEntityManager::~CEntityManager()
delete( m_entities[i].m_entity );
}
void CEntityManager::deleteAll()
{
m_extant = false;
for( int i = 0; i < MAX_HANDLES; i++ )
if( m_entities[i].m_refcount )
{
delete( m_entities[i].m_entity );
m_entities[i].m_refcount = 0;
}
m_nextalloc = 0;
m_extant = true;
}
HEntity CEntityManager::create( CBaseEntity* base, CVector3D position, float orientation )
{
assert( base );