diff options
Diffstat (limited to 'src/script/api/script_company.cpp')
-rw-r--r-- | src/script/api/script_company.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script/api/script_company.cpp b/src/script/api/script_company.cpp index 5769c97fa..93bba6332 100644 --- a/src/script/api/script_company.cpp +++ b/src/script/api/script_company.cpp @@ -204,8 +204,10 @@ if (loan == GetLoanAmount()) return true; + Money amount = abs(loan - GetLoanAmount()); + return ScriptObject::DoCommand(0, - abs(loan - GetLoanAmount()), 2, + amount >> 32, (amount & 0xFFFFFFFC) | 2, (loan > GetLoanAmount()) ? CMD_INCREASE_LOAN : CMD_DECREASE_LOAN); } |