summaryrefslogtreecommitdiff
path: root/misc_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc_cmd.c')
-rw-r--r--misc_cmd.c9
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;