From b06140607b64df884374e4e3343d7ec9c84ed4d8 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 6 Apr 2018 14:12:32 -0400 Subject: [PATCH] Core/Commands: Allow GMs to enter water while .gm fly is on --- Source/Game/Chat/Commands/GMCommands.cs | 6 ++++++ Source/Game/Entities/Unit/Unit.Movement.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Game/Chat/Commands/GMCommands.cs b/Source/Game/Chat/Commands/GMCommands.cs index 6486b262c..65b595171 100644 --- a/Source/Game/Chat/Commands/GMCommands.cs +++ b/Source/Game/Chat/Commands/GMCommands.cs @@ -105,9 +105,15 @@ namespace Game.Chat string arg = args.NextString().ToLower(); if (arg == "on") + { target.SetCanFly(true); + target.SetCanTransitionBetweenSwimAndFly(true); + } else if (arg == "off") + { target.SetCanFly(false); + target.SetCanTransitionBetweenSwimAndFly(false); + } else { handler.SendSysMessage(CypherStrings.UseBol); diff --git a/Source/Game/Entities/Unit/Unit.Movement.cs b/Source/Game/Entities/Unit/Unit.Movement.cs index a31158308..b932cc501 100644 --- a/Source/Game/Entities/Unit/Unit.Movement.cs +++ b/Source/Game/Entities/Unit/Unit.Movement.cs @@ -263,7 +263,7 @@ namespace Game.Entities return true; } - bool SetCanTransitionBetweenSwimAndFly(bool enable) + public bool SetCanTransitionBetweenSwimAndFly(bool enable) { if (!IsTypeId(TypeId.Player)) return false;