Do not create text effects when running headlessly
This commit is contained in:
@@ -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 == 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 _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)) {
|
&& !front->current_order.IsType(OT_LOADING_ADVANCE)) {
|
||||||
StringID percent_up_down = STR_NULL;
|
StringID percent_up_down = STR_NULL;
|
||||||
int percent = CalcPercentVehicleFilled(front, &percent_up_down);
|
int percent = CalcPercentVehicleFilled(front, &percent_up_down);
|
||||||
|
@@ -610,7 +610,7 @@ void ShowEstimatedCostOrIncome(Money cost, int x, int y)
|
|||||||
*/
|
*/
|
||||||
void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost)
|
void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost)
|
||||||
{
|
{
|
||||||
if (!HasBit(_extra_display_opt, XDO_SHOW_MONEY_TEXT_EFFECTS) || cost == 0) return;
|
if (IsHeadless() || !HasBit(_extra_display_opt, XDO_SHOW_MONEY_TEXT_EFFECTS) || cost == 0) return;
|
||||||
|
|
||||||
Point pt = RemapCoords(x, y, z);
|
Point pt = RemapCoords(x, y, z);
|
||||||
StringID msg = STR_INCOME_FLOAT_COST;
|
StringID msg = STR_INCOME_FLOAT_COST;
|
||||||
@@ -632,7 +632,7 @@ void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost)
|
|||||||
*/
|
*/
|
||||||
void ShowFeederIncomeAnimation(int x, int y, int z, Money transfer, Money income)
|
void ShowFeederIncomeAnimation(int x, int y, int z, Money transfer, Money income)
|
||||||
{
|
{
|
||||||
if (!HasBit(_extra_display_opt, XDO_SHOW_MONEY_TEXT_EFFECTS)) return;
|
if (IsHeadless() || !HasBit(_extra_display_opt, XDO_SHOW_MONEY_TEXT_EFFECTS)) return;
|
||||||
|
|
||||||
Point pt = RemapCoords(x, y, z);
|
Point pt = RemapCoords(x, y, z);
|
||||||
|
|
||||||
|
@@ -3523,7 +3523,7 @@ void CcStartStopVehicle(const CommandCost &result, TileIndex tile, uint32_t p1,
|
|||||||
void StartStopVehicle(const Vehicle *v, bool texteffect)
|
void StartStopVehicle(const Vehicle *v, bool texteffect)
|
||||||
{
|
{
|
||||||
assert(v->IsPrimaryVehicle());
|
assert(v->IsPrimaryVehicle());
|
||||||
DoCommandP(v->tile, v->index, 0, _vehicle_command_translation_table[VCT_CMD_START_STOP][v->type], texteffect ? CcStartStopVehicle : nullptr);
|
DoCommandP(v->tile, v->index, 0, _vehicle_command_translation_table[VCT_CMD_START_STOP][v->type], (texteffect && !IsHeadless()) ? CcStartStopVehicle : nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Strings for aircraft breakdown types */
|
/** Strings for aircraft breakdown types */
|
||||||
|
Reference in New Issue
Block a user