summaryrefslogtreecommitdiff
path: root/command.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
commitaa7334a3eca674131dc1198c592c7e4a925f1d56 (patch)
treedbd1b9d6a856fcab15da2adfe0bacfb2bdc19b7e /command.c
parente2df1d71d5ec39f89c540f116c1cb0b765a74229 (diff)
downloadopenttd-aa7334a3eca674131dc1198c592c7e4a925f1d56.tar.xz
(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer
Diffstat (limited to 'command.c')
-rw-r--r--command.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/command.c b/command.c
index e0c948841..f1ef48098 100644
--- a/command.c
+++ b/command.c
@@ -336,7 +336,7 @@ int32 DoCommand(int x, int y, uint32 p1, uint32 p2, uint32 flags, uint procc)
_error_message = INVALID_STRING_ID;
// update last build coord of player
if ( (x|y) != 0 && _current_player < MAX_PLAYERS) {
- DEREF_PLAYER(_current_player)->last_build_coordinate = TILE_FROM_XY(x,y);
+ GetPlayer(_current_player)->last_build_coordinate = TILE_FROM_XY(x,y);
}
}
@@ -386,7 +386,7 @@ int32 GetAvailableMoneyForCommand(void)
{
PlayerID pid = _current_player;
if (pid >= MAX_PLAYERS) return 0x7FFFFFFF; // max int
- return DEREF_PLAYER(pid)->player_money;
+ return GetPlayer(pid)->player_money;
}
// toplevel network safe docommand function for the current player. must not be called recursively.
@@ -497,7 +497,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
#endif /* ENABLE_NETWORK */
// update last build coordinate of player.
- if ( tile != 0 && _current_player < MAX_PLAYERS) DEREF_PLAYER(_current_player)->last_build_coordinate = tile;
+ if ( tile != 0 && _current_player < MAX_PLAYERS) GetPlayer(_current_player)->last_build_coordinate = tile;
/* Actually try and execute the command. If no cost-type is given
* use the construction one */