Do not create text effects when running headlessly

This commit is contained in:
Jonathan G Rennison
2024-01-22 23:17:36 +00:00
parent fa003ebda3
commit 04e47eca9a
3 changed files with 4 additions and 4 deletions

View File

@@ -2377,7 +2377,7 @@ static void LoadUnloadVehicle(Vehicle *front)
* if _settings_client.gui.loading_indicators == 1, _local_company must be the owner or must be a spectator to show ind., so 1 > 0
* if _settings_client.gui.loading_indicators == 0, do not display indicators ... 0 is never greater than anything
*/
if (_game_mode != GM_MENU && (_settings_client.gui.loading_indicators > (uint)(front->owner != _local_company && _local_company != COMPANY_SPECTATOR))
if (_game_mode != GM_MENU && !IsHeadless() && (_settings_client.gui.loading_indicators > (uint)(front->owner != _local_company && _local_company != COMPANY_SPECTATOR))
&& !front->current_order.IsType(OT_LOADING_ADVANCE)) {
StringID percent_up_down = STR_NULL;
int percent = CalcPercentVehicleFilled(front, &percent_up_down);