From 558b525bef5cf8f2d1264b1f95e32ccba322ebfb Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Tue, 3 May 2022 12:07:18 -0500 Subject: [PATCH] Show error when game loc doesnt exist for teleport --- scripts/server/staff.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/server/staff.js b/scripts/server/staff.js index 00dd9d0d..11f91529 100644 --- a/scripts/server/staff.js +++ b/scripts/server/staff.js @@ -494,13 +494,14 @@ function gotoGameLocationCommand(command, params, client) { let gameLocationId = getGameLocationFromParams(params); - if(!gameLocationId) { + if(gameLocationId == false) { messagePlayerError(client, "That game location doesn't exist!"); return false; } setPlayerVelocity(client, toVector3(0.0, 0.0, 0.0)); setPlayerPosition(client, getGameConfig().locations[getGame()][gameLocationId][1]); + setPlayerHeading(client, getGameConfig().locations[getGame()][gameLocationId][1]); setPlayerInterior(client, 0); setPlayerDimension(client, 0); updateInteriorLightsForPlayer(client, true);