diff options
author | rubidium <rubidium@openttd.org> | 2008-09-30 20:39:50 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-09-30 20:39:50 +0000 |
commit | 3b798599b63067c2e92aa49906ea66a07ae8de44 (patch) | |
tree | 69fb7ae1d9bdadb9e7386cb70b0a26621ad9b57f /src/rail_gui.cpp | |
parent | cc1e761edab14f8264dba44d09f7272d931bdd93 (diff) | |
download | openttd-3b798599b63067c2e92aa49906ea66a07ae8de44.tar.xz |
(svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with.
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r-- | src/rail_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 4ce44acae..ba2951477 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -843,7 +843,7 @@ void ShowBuildRailToolbar(RailType railtype, int button) { BuildRailToolbarWindow *w; - if (!IsValidPlayerID(_current_player)) return; + if (!IsValidCompanyID(_current_company)) return; if (!ValParamRailtype(railtype)) return; // don't recreate the window if we're clicking on a button and the window exists. @@ -1718,7 +1718,7 @@ void ReinitGuiAfterToggleElrail(bool disable) /** Set the initial (default) railtype to use */ static void SetDefaultRailGui() { - if (_local_player == PLAYER_SPECTATOR || !IsValidPlayerID(_local_player)) return; + if (_local_company == COMPANY_SPECTATOR || !IsValidCompanyID(_local_company)) return; extern RailType _last_built_railtype; RailType rt = (RailType)_settings_client.gui.default_rail_type; @@ -1745,11 +1745,11 @@ static void SetDefaultRailGui() switch (rt) { case RAILTYPE_END + 0: rt = RAILTYPE_RAIL; - while (rt < RAILTYPE_END && !HasRailtypeAvail(_local_player, rt)) rt++; + while (rt < RAILTYPE_END && !HasRailtypeAvail(_local_company, rt)) rt++; break; case RAILTYPE_END + 1: - rt = GetBestRailtype(_local_player); + rt = GetBestRailtype(_local_company); break; default: |