Beispiel #1
0
void GAMEWORLD::reset()
{
	// reset all entities
	for(ENTITY *ent = first_entity; ent; ent = ent->next_entity)
		ent->reset();
	remove_entities();

	game.controller->post_reset();
	remove_entities();
	reset_requested = false;
}
Beispiel #2
0
void GAMEWORLD::tick()
{
	if(reset_requested)
		reset();

	if(!paused)
	{
		if(game.controller->is_force_balanced())
			game.send_chat(-1, GAMECONTEXT::CHAT_ALL, "Teams have been balanced");
		// update all objects
		for(ENTITY *ent = first_entity; ent; ent = ent->next_entity)
			ent->tick();
		
		for(ENTITY *ent = first_entity; ent; ent = ent->next_entity)
			ent->tick_defered();
	}

	remove_entities();
}