Пример #1
0
CAgentManager::~CAgentManager			()
{
	VERIFY						(member().members().empty());
#ifdef USE_SCHEDULER_IN_AGENT_MANAGER
	remove_scheduler			();
#endif // USE_SCHEDULER_IN_AGENT_MANAGER
	remove_components			();
}
Пример #2
0
// remove an entity on the client because the server told us to
void World::net_remove(Entity* e)
{
	vi_assert(Entity::list.active(e->id()));
	vi_assert(Entity::list.count() > 0);
	remove_components(e);
	Entity::list.active(e->id(), false);
	e->revision++;
	Entity::list.free_list.length++;
}
Пример #3
0
// if the entity is active, remove it
// returns true if the entity was actually active and removed
// World::remove_deferred WILL NOT crash when it removes an entity multiple times
// World::remove WILL crash if you try to remove an inactive entity
b8 internal_remove(Entity* e)
{
	ID id = e->id();
	if (Entity::list.active(id))
	{
		Net::remove(e);
		remove_components(e);
		e->revision++;
		Entity::list.remove(id);
		return true;
	}
	return false;
}