Show error when game loc doesnt exist for teleport

This commit is contained in:
Vortrex
2022-05-03 12:07:18 -05:00
parent 970b007cf9
commit 558b525bef

View File

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