1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-23 14:39:08 +00:00

(svn r85) -Add: initial commit of new AI (enable in Patch menu)

-Add: generalised A* Algorithm
-Add: generalised queues (Fifo, Stack, InsSort, BinaryHeap)
This commit is contained in:
truelight
2004-08-20 09:32:32 +00:00
parent 80b1e25b6c
commit 788ace088d
23 changed files with 3688 additions and 27 deletions

View File

@@ -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;