forked from mirrors/0ad
# Tidied up some code.
- Made some classes not be singletons, since there's no reason why they should be. - Made them non-global too (because globals have unclear lifetimes, and make it harder to test things, etc). They're now owned by CGameView and CWorld, and mostly accessed via g_Game or arguments (vaguely trying to avoid the graphics code calling into the game code). - Moved CGameView implementation into pimpl, so the header file isn't so heavy. - Changed a few pointers into references, to indicate that they're never NULL. This was SVN commit r4756.
This commit is contained in:
@@ -405,7 +405,7 @@ bool CEntity::Kill( JSContext* UNUSED(cx), uintN UNUSED(argc), jsval* UNUSED(arg
|
||||
}
|
||||
else
|
||||
{
|
||||
g_UnitMan.RemoveUnit( m_actor );
|
||||
g_Game->GetWorld()->GetUnitManager().RemoveUnit( m_actor );
|
||||
delete( m_actor );
|
||||
m_actor = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user