mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-24 06:59:10 +00:00
(svn r1284) -Fix: Fixed 'money-cheat' (read: bug which could give people a lot of money)
This commit is contained in:
@@ -285,6 +285,11 @@ 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
|
||||
|
||||
if (p1 == 0)
|
||||
return CMD_ERROR;
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
// Add money to player
|
||||
byte old_cp = _current_player;
|
||||
|
Reference in New Issue
Block a user