allow client-side lua to be reloaded in multiplayer

This commit is contained in:
Evil Factory
2022-01-01 11:38:29 -03:00
parent c399da8038
commit 729cef7f3c

View File

@@ -3213,13 +3213,7 @@ namespace Barotrauma
commands.Add(new Command("cl_lua", "lua_cl: runs a string on the client", (string[] args) =>
{
if (GameMain.Client == null)
{
ThrowError("Client not connected to a server.");
return;
}
if (!GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
if (GameMain.Client != null && !GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
{
ThrowError("Command not permitted.");
return;
@@ -3230,13 +3224,7 @@ namespace Barotrauma
commands.Add(new Command("cl_reloadlua", "reloads lua on the client", (string[] args) =>
{
if (GameMain.Client == null)
{
ThrowError("Client not connected to a server.");
return;
}
if (!GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
if (GameMain.Client != null && !GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
{
ThrowError("Command not permitted.");
return;