allow client-side lua to be reloaded in multiplayer
This commit is contained in:
@@ -3213,13 +3213,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
commands.Add(new Command("cl_lua", "lua_cl: runs a string on the client", (string[] args) =>
|
commands.Add(new Command("cl_lua", "lua_cl: runs a string on the client", (string[] args) =>
|
||||||
{
|
{
|
||||||
if (GameMain.Client == null)
|
if (GameMain.Client != null && !GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
|
||||||
{
|
|
||||||
ThrowError("Client not connected to a server.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
|
|
||||||
{
|
{
|
||||||
ThrowError("Command not permitted.");
|
ThrowError("Command not permitted.");
|
||||||
return;
|
return;
|
||||||
@@ -3230,13 +3224,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
commands.Add(new Command("cl_reloadlua", "reloads lua on the client", (string[] args) =>
|
commands.Add(new Command("cl_reloadlua", "reloads lua on the client", (string[] args) =>
|
||||||
{
|
{
|
||||||
if (GameMain.Client == null)
|
if (GameMain.Client != null && !GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
|
||||||
{
|
|
||||||
ThrowError("Client not connected to a server.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!GameMain.Client.HasPermission(ClientPermissions.ConsoleCommands))
|
|
||||||
{
|
{
|
||||||
ThrowError("Command not permitted.");
|
ThrowError("Command not permitted.");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user