diff options
author | truelight <truelight@openttd.org> | 2004-08-20 09:32:32 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-08-20 09:32:32 +0000 |
commit | 788ace088d8b3ba2afd77a8b21b532abc40d9eba (patch) | |
tree | 493248c0850e836b9a0d35c0fdddf9673b2a01b3 /misc_cmd.c | |
parent | 80b1e25b6ce190a773ab9fe50927a983c8f2d038 (diff) | |
download | openttd-788ace088d8b3ba2afd77a8b21b532abc40d9eba.tar.xz |
(svn r85) -Add: initial commit of new AI (enable in Patch menu)
-Add: generalised A* Algorithm
-Add: generalised queues (Fifo, Stack, InsSort, BinaryHeap)
Diffstat (limited to 'misc_cmd.c')
-rw-r--r-- | misc_cmd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/misc_cmd.c b/misc_cmd.c index 59bed3fbc..5015d37bf 100644 --- a/misc_cmd.c +++ b/misc_cmd.c @@ -93,9 +93,12 @@ int32 CmdDecreaseLoan(int x, int y, uint32 flags, uint32 p1, uint32 p2) size = p->current_loan; // p2 is true while CTRL is pressed (repay all possible loan, or max money you have) - if (!p2) - size = min(size, IS_HUMAN_PLAYER((byte)p1) ? 10000 : 50000); - else { // only repay in chunks of 10K + if (!p2) { + if (_patches.ainew_active) + size = min(size, 10000); + else + size = min(size, IS_HUMAN_PLAYER((byte)p1) ? 10000 : 50000); + } else { // only repay in chunks of 10K size = min(size, p->player_money); size = max(size, 10000); size -= size % 10000; |