mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove unnecessary game command ids
This commit is contained in:
parent
91d6338db5
commit
54af81450e
|
@ -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
|
||||
|
|
|
@ -51,9 +51,7 @@ const std::array<NetworkAction, static_cast<size_t>(NetworkPermission::Count)> N
|
|||
NetworkAction{
|
||||
STR_ACTION_CHAT,
|
||||
"PERMISSION_CHAT",
|
||||
{
|
||||
GameCommand::Chat,
|
||||
},
|
||||
{},
|
||||
},
|
||||
NetworkAction{
|
||||
STR_ACTION_TERRAFORM,
|
||||
|
@ -244,16 +242,12 @@ const std::array<NetworkAction, static_cast<size_t>(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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue