(svn r13731) -Codechange: make a pool of the array of players.

This commit is contained in:
rubidium
2008-07-18 16:40:29 +00:00
parent 891bec7e23
commit 3a799389eb
38 changed files with 173 additions and 242 deletions

View File

@@ -193,7 +193,7 @@ void AI_RunGameLoop()
const Player* p;
FOR_ALL_PLAYERS(p) {
if (p->is_active && p->is_ai) {
if (p->is_ai) {
/* This should always be true, else something went wrong... */
assert(_ai_player[p->index].active);
@@ -249,6 +249,6 @@ void AI_Uninitialize()
const Player* p;
FOR_ALL_PLAYERS(p) {
if (p->is_active && p->is_ai) AI_PlayerDied(p->index);
if (p->is_ai) AI_PlayerDied(p->index);
}
}

View File

@@ -3897,8 +3897,7 @@ static void AiHandleTakeover(Player *p)
// Ask the guy with the highest performance hist.
FOR_ALL_PLAYERS(pp) {
if (pp->is_active &&
!(asked & 1) &&
if (!(asked & 1) &&
pp->bankrupt_asked == 0 &&
best_val < pp->old_economy[1].performance_history) {
best_val = pp->old_economy[1].performance_history;