summaryrefslogtreecommitdiff
path: root/economy.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-09-07 15:10:11 +0000
committertruelight <truelight@openttd.org>2005-09-07 15:10:11 +0000
commit991d5c623467ee13c0f3df90eaa2d5127a4d5be9 (patch)
tree692137bc97cba13a50b293ec5598e1abe6982f5e /economy.c
parente39bf0dc3411347759e7d55080f051d4935353c7 (diff)
downloadopenttd-991d5c623467ee13c0f3df90eaa2d5127a4d5be9.tar.xz
(svn r2921) -Codechange: moved all AI-code to 1 central place (ai/ai.c)
-Fix: removed the ability for the oldAI to cheat (this will criple him somewhat) -Add: base-code for many improvements to come in the AI-system -Add: added base-code for multiplayer AIs (DOES NOT WORK YET!)
Diffstat (limited to 'economy.c')
-rw-r--r--economy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/economy.c b/economy.c
index 1c4cd70e7..97e7ae9a3 100644
--- a/economy.c
+++ b/economy.c
@@ -25,6 +25,7 @@
#include "network_data.h"
#include "variables.h"
#include "vehicle_gui.h"
+#include "ai/ai.h"
// Score info
const ScoreInfo _score_info[] = {
@@ -473,6 +474,9 @@ static void PlayersCheckBankrupt(Player *p)
ChangeOwnershipOfPlayerItems(owner, 0xFF); // 255 is no owner
// Register the player as not-active
p->is_active = false;
+
+ if (!IS_HUMAN_PLAYER(owner) && (!_networking || _network_server) && _ai.enabled)
+ AI_PlayerDied(owner);
}
}
}
@@ -1249,10 +1253,6 @@ static int32 DeliverGoods(int num_pieces, byte cargo_type, uint16 source, uint16
}
}
- // Computers get 25% extra profit if they're intelligent.
- if (_opt.diff.competitor_intelligence>=1 && !IS_HUMAN_PLAYER(_current_player))
- profit += profit >> 2;
-
return profit;
}