mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-29 09:44:52 +01:00
Start work on custom game actions
This commit is contained in:
@@ -2997,12 +2997,15 @@ void Network::Server_Handle_GAME_ACTION(NetworkConnection& connection, NetworkPa
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if player's group permission allows command to run
|
||||
NetworkGroup* group = GetGroupByID(connection.Player->Group);
|
||||
if (group == nullptr || group->CanPerformCommand(actionType) == false)
|
||||
if (actionType != GAME_COMMAND_CUSTOM)
|
||||
{
|
||||
Server_Send_SHOWERROR(connection, STR_CANT_DO_THIS, STR_PERMISSION_DENIED);
|
||||
return;
|
||||
// Check if player's group permission allows command to run
|
||||
NetworkGroup* group = GetGroupByID(connection.Player->Group);
|
||||
if (group == nullptr || group->CanPerformCommand(actionType) == false)
|
||||
{
|
||||
Server_Send_SHOWERROR(connection, STR_CANT_DO_THIS, STR_PERMISSION_DENIED);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Create and enqueue the action.
|
||||
|
||||
Reference in New Issue
Block a user