From 3a35f18d24a3a052d41cc2a3ec14055aff1c354a Mon Sep 17 00:00:00 2001 From: John <63141077+AconiteX@users.noreply.github.com> Date: Wed, 17 Mar 2021 18:35:55 -0400 Subject: [PATCH] make it slightly harder to teleport a building --- .../serverGame/src/shared/command/CommandCppFuncs.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engine/server/library/serverGame/src/shared/command/CommandCppFuncs.cpp b/engine/server/library/serverGame/src/shared/command/CommandCppFuncs.cpp index d3ffeafe..7a03d1aa 100755 --- a/engine/server/library/serverGame/src/shared/command/CommandCppFuncs.cpp +++ b/engine/server/library/serverGame/src/shared/command/CommandCppFuncs.cpp @@ -1104,6 +1104,13 @@ static void commandFuncAdminTeleport(Command const &, NetworkId const &actor, Ne if (teleportObj) { + + // prevents teleporting anything but creatures/players so GMs can't teleport buildings accidentally + // note: /object commands can still be used to move non-player objects + if (!GameObjectTypes::isTypeOf(teleportObj->getGameObjectType(), SharedObjectTemplate::GOT_creature)) { + return; + } + // if the person teleporting is the owner of the containing ship, move the ship instead ShipObject * const ship = getAttachedShip(teleportObj->asCreatureObject()); if (ship)