mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-22 15:11:54 +00:00
(svn r1286) -Fix: oeps, I clamp'd some numbers wrong :$
This commit is contained in:
parent
a5a811f767
commit
c531739602
@ -88,7 +88,7 @@ void HandleOnEditText(WindowEvent *e) {
|
||||
int32 money = atoi(e->edittext.str) / GetCurrentCurrencyRate();
|
||||
char msg[100];
|
||||
|
||||
money = clamp(money, 0, 0xFFFFFFFF); // Clamp between 4 billion and 0
|
||||
money = clamp(money, 0, 0xFFFFFF); // Clamp between 16 million and 0
|
||||
|
||||
// Give 'id' the money, and substract it from ourself
|
||||
if (!DoCommandP(0, money, id, NULL, CMD_GIVE_MONEY)) break;
|
||||
|
@ -285,7 +285,7 @@ int32 CmdGiveMoney(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
{
|
||||
SET_EXPENSES_TYPE(EXPENSES_OTHER);
|
||||
|
||||
p1 = clamp(p1, 0, 0xFFFFFFFF); // Clamp between 4 billion and 0
|
||||
p1 = clamp(p1, 0, 0xFFFFFF); // Clamp between 16 million and 0
|
||||
|
||||
if (p1 == 0)
|
||||
return CMD_ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user