src/ai/ai.cpp
changeset 9358 2e1e4d2f71dd
parent 9354 845e07db4549
child 9413 7042a8ec3fa8
equal deleted inserted replaced
9357:f540f1fb6bd9 9358:2e1e4d2f71dd
   182 
   182 
   183 	/* New tick */
   183 	/* New tick */
   184 	_ai.tick++;
   184 	_ai.tick++;
   185 
   185 
   186 	/* Make sure the AI follows the difficulty rule.. */
   186 	/* Make sure the AI follows the difficulty rule.. */
   187 	assert(_opt.diff.competitor_speed <= 4);
   187 	assert(_settings.difficulty.competitor_speed <= 4);
   188 	if ((_ai.tick & ((1 << (4 - _opt.diff.competitor_speed)) - 1)) != 0) return;
   188 	if ((_ai.tick & ((1 << (4 - _settings.difficulty.competitor_speed)) - 1)) != 0) return;
   189 
   189 
   190 	/* Check for AI-client (so joining a network with an AI) */
   190 	/* Check for AI-client (so joining a network with an AI) */
   191 	if (!_networking || _network_server) {
   191 	if (!_networking || _network_server) {
   192 		/* Check if we want to run AIs (server or SP only) */
   192 		/* Check if we want to run AIs (server or SP only) */
   193 		const Player* p;
   193 		const Player* p;