summaryrefslogtreecommitdiff
path: root/misc_cmd.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-06-21 16:28:17 +0000
committercelestar <celestar@openttd.org>2005-06-21 16:28:17 +0000
commit354058341b8500cbb0075c0c568ec12063e84fe7 (patch)
treedbd1b9d6a856fcab15da2adfe0bacfb2bdc19b7e /misc_cmd.c
parent09f92807fc061b80b976a4134d71670ef4ef64fa (diff)
downloadopenttd-354058341b8500cbb0075c0c568ec12063e84fe7.tar.xz
(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer
Diffstat (limited to 'misc_cmd.c')
-rw-r--r--misc_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc_cmd.c b/misc_cmd.c
index 430bef6bd..5e5926064 100644
--- a/misc_cmd.c
+++ b/misc_cmd.c
@@ -137,7 +137,7 @@ int32 CmdChangeCompanyName(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if (str == 0) return CMD_ERROR;
if (flags & DC_EXEC) {
- p = DEREF_PLAYER(_current_player);
+ p = GetPlayer(_current_player);
DeleteName(p->name_1);
p->name_1 = str;
MarkWholeScreenDirty();
@@ -163,7 +163,7 @@ int32 CmdChangePresidentName(int x, int y, uint32 flags, uint32 p1, uint32 p2)
if (str == 0) return CMD_ERROR;
if (flags & DC_EXEC) {
- p = DEREF_PLAYER(_current_player);
+ p = GetPlayer(_current_player);
DeleteName(p->president_name_1);
p->president_name_1 = str;
@@ -226,7 +226,7 @@ int32 CmdMoneyCheat(int x, int y, uint32 flags, uint32 p1, uint32 p2)
*/
int32 CmdGiveMoney(int x, int y, uint32 flags, uint32 p1, uint32 p2)
{
- const Player *p = DEREF_PLAYER(_current_player);
+ const Player *p = GetPlayer(_current_player);
int32 amount = min((int32)p1, 20000000);
SET_EXPENSES_TYPE(EXPENSES_OTHER);