summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index b12a912e1..9c55781d2 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1718,6 +1718,16 @@ 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) {
+ int percent = CalcPercentVehicleFilled(v);
+ if (v->fill_percent_te_id == INVALID_TE_ID) {
+ v->fill_percent_te_id = ShowFillingPercent(v->x_pos, v->y_pos, v->z_pos + 20, percent);
+ } else {
+ UpdateFillingPercent(v->fill_percent_te_id, percent);
+ }
+ }
+
v->load_unload_time_rem = unloading_time;
if (completely_empty) {