1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 09:44:52 +01:00

Fix game action errors not showing if no round trip was done (#9175)

This commit is contained in:
ζeh Matt
2019-05-01 22:53:11 +02:00
committed by Michael Steenbeek
parent 1e1d263dae
commit 181a722c3b

View File

@@ -363,7 +363,10 @@ namespace GameActions
// In network mode the error should be only shown to the issuer of the action.
if (network_get_mode() != NETWORK_MODE_NONE)
{
if (action->GetPlayer() != network_get_current_player_id())
// If the action was never networked and query fails locally the player id is not assigned.
// So compare only if the action went into the queue otherwise show errors by default.
const bool isActionFromNetwork = (action->GetFlags() & GAME_COMMAND_FLAG_NETWORKED) != 0;
if (isActionFromNetwork && action->GetPlayer() != network_get_current_player_id())
{
shouldShowError = false;
}