summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-08 22:04:49 +0000
committerrubidium <rubidium@openttd.org>2007-09-08 22:04:49 +0000
commit211b8dea39df6e8f38042f520269d7cb5d851ea9 (patch)
tree7eabd4473c65749847f758e529f06ce7996d5e5e /src/economy.cpp
parent7b0fd59eaa118b98352a599ae24eddbed69ab5f9 (diff)
downloadopenttd-211b8dea39df6e8f38042f520269d7cb5d851ea9.tar.xz
(svn r11063) -Codechange: make it possible for people to view the loading indicators of everyone. Patch by SmatZ.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 8c5be601c..f0669be00 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1690,8 +1690,13 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
}
}
- /* Calculate the loading indicator fill percent and display */
- if (_patches.loading_indicators && _game_mode != GM_MENU && v->owner == _local_player) {
+ /* Calculate the loading indicator fill percent and display
+ * In the Game Menu do not display indicators
+ * If _patches.loading_indicators == 2, show indicators (bool can be promoted to int as 0 or 1 - results in 2 > 0,1 )
+ * if _patches.loading_indicators == 1, _local_player must be the owner or must be a spectator to show ind., so 1 > 0
+ * if _patches.loading_indicators == 0, do not display indicators ... 0 is never greater than anything
+ */
+ if (_game_mode != GM_MENU && (_patches.loading_indicators > (v->owner != _local_player && _local_player != PLAYER_SPECTATOR))) {
StringID percent_up_down = STR_NULL;
int percent = CalcPercentVehicleFilled(v, &percent_up_down);
if (v->fill_percent_te_id == INVALID_TE_ID) {