summaryrefslogtreecommitdiff
path: root/src/misc_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-18 21:00:14 +0000
committerrubidium <rubidium@openttd.org>2007-06-18 21:00:14 +0000
commit7dda2d93da840519f1388d0191a00362ff97feb6 (patch)
tree1ba3bbf25a5886a7f40a02d3403d53c57e634d75 /src/misc_cmd.cpp
parent6785ea670fa3eb4734be42851b0f31199bc5b7e5 (diff)
downloadopenttd-7dda2d93da840519f1388d0191a00362ff97feb6.tar.xz
(svn r10207) -Codechange: remove the redundant player_money in favour of the money64, which is now renamed to player_money.
Diffstat (limited to 'src/misc_cmd.cpp')
-rw-r--r--src/misc_cmd.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp
index 5af1566d9..d96689f67 100644
--- a/src/misc_cmd.cpp
+++ b/src/misc_cmd.cpp
@@ -145,9 +145,8 @@ CommandCost CmdIncreaseLoan(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
}
if (flags & DC_EXEC) {
- p->money64 += loan;
+ p->player_money += loan;
p->current_loan += loan;
- UpdatePlayerMoney32(p);
InvalidatePlayerWindows(p);
}
@@ -185,9 +184,8 @@ CommandCost CmdDecreaseLoan(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
}
if (flags & DC_EXEC) {
- p->money64 -= loan;
+ p->player_money -= loan;
p->current_loan -= loan;
- UpdatePlayerMoney32(p);
InvalidatePlayerWindows(p);
}
return CommandCost();
@@ -311,7 +309,7 @@ CommandCost CmdGiveMoney(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
SET_EXPENSES_TYPE(EXPENSES_OTHER);
/* You can only transfer funds that is in excess of your loan */
- if (p->money64 - p->current_loan < amount.GetCost() || amount.GetCost() <= 0) return CMD_ERROR;
+ if (p->player_money - p->current_loan < amount.GetCost() || amount.GetCost() <= 0) return CMD_ERROR;
if (!_networking || !IsValidPlayer((PlayerID)p2)) return CMD_ERROR;
if (flags & DC_EXEC) {