(svn r10254) -Feature: loading indicator, which shows in % how full a vehicle is while loading/unloading (TheJosh)

This commit is contained in:
truelight
2007-06-21 16:17:47 +00:00
parent 2792019b78
commit 56eb1738ee
14 changed files with 180 additions and 36 deletions

View File

@@ -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) {