mirror of
https://github.com/SWG-Source/src.git
synced 2026-09-11 23:45:01 -04:00
make it slightly harder to teleport a building
This commit is contained in:
@@ -1104,6 +1104,13 @@ static void commandFuncAdminTeleport(Command const &, NetworkId const &actor, Ne
|
|||||||
|
|
||||||
if (teleportObj)
|
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
|
// if the person teleporting is the owner of the containing ship, move the ship instead
|
||||||
ShipObject * const ship = getAttachedShip(teleportObj->asCreatureObject());
|
ShipObject * const ship = getAttachedShip(teleportObj->asCreatureObject());
|
||||||
if (ship)
|
if (ship)
|
||||||
|
|||||||
Reference in New Issue
Block a user