diff --git a/src/openrct2/Game.h b/src/openrct2/Game.h index 107a66e207..53f85c78b6 100644 --- a/src/openrct2/Game.h +++ b/src/openrct2/Game.h @@ -18,10 +18,6 @@ struct rct_s6_data; enum class GameCommand : int32_t { - PasswordlessLogin = -3, - ToggleSceneryCluster = -2, - Chat = -1, - SetRideAppearance, // GA SetLandHeight, // GA TogglePause, // GA diff --git a/src/openrct2/network/NetworkAction.cpp b/src/openrct2/network/NetworkAction.cpp index 005de69e7c..1646f13dd3 100644 --- a/src/openrct2/network/NetworkAction.cpp +++ b/src/openrct2/network/NetworkAction.cpp @@ -51,9 +51,7 @@ const std::array(NetworkPermission::Count)> N NetworkAction{ STR_ACTION_CHAT, "PERMISSION_CHAT", - { - GameCommand::Chat, - }, + {}, }, NetworkAction{ STR_ACTION_TERRAFORM, @@ -244,16 +242,12 @@ const std::array(NetworkPermission::Count)> N NetworkAction{ STR_ACTION_TOGGLE_SCENERY_CLUSTER, "PERMISSION_TOGGLE_SCENERY_CLUSTER", - { - GameCommand::ToggleSceneryCluster, - }, + {}, }, NetworkAction{ STR_ACTION_PASSWORDLESS_LOGIN, "PERMISSION_PASSWORDLESS_LOGIN", - { - GameCommand::PasswordlessLogin, - }, + {}, }, NetworkAction{ STR_ACTION_MODIFY_TILE, diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index aa2fb7e057..24fc479689 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -2578,7 +2578,7 @@ void NetworkBase::Server_Handle_AUTH(NetworkConnection& connection, NetworkPacke if (connection.AuthStatus == NetworkAuth::Verified) { const NetworkGroup* group = GetGroupByID(GetGroupIDByHash(connection.Key.PublicKeyHash())); - passwordless = group->CanPerformCommand(GameCommand::PasswordlessLogin); + passwordless = group->CanPerformAction(NetworkPermission::PasswordlessLogin); } if (gameversion != network_get_version()) { @@ -2885,7 +2885,7 @@ void NetworkBase::Server_Handle_CHAT(NetworkConnection& connection, NetworkPacke if (connection.Player != nullptr) { NetworkGroup* group = GetGroupByID(connection.Player->Group); - if (group == nullptr || !group->CanPerformCommand(GameCommand::Chat)) + if (group == nullptr || !group->CanPerformAction(NetworkPermission::Chat)) { return; }