make it slightly harder to teleport a building

This commit is contained in:
John
2021-03-17 18:35:55 -04:00
committed by GitHub
parent ebfc3e0877
commit 3a35f18d24

View File

@@ -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)