Show error when game loc doesnt exist for teleport
This commit is contained in:
@@ -494,13 +494,14 @@ function gotoGameLocationCommand(command, params, client) {
|
|||||||
|
|
||||||
let gameLocationId = getGameLocationFromParams(params);
|
let gameLocationId = getGameLocationFromParams(params);
|
||||||
|
|
||||||
if(!gameLocationId) {
|
if(gameLocationId == false) {
|
||||||
messagePlayerError(client, "That game location doesn't exist!");
|
messagePlayerError(client, "That game location doesn't exist!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
setPlayerVelocity(client, toVector3(0.0, 0.0, 0.0));
|
setPlayerVelocity(client, toVector3(0.0, 0.0, 0.0));
|
||||||
setPlayerPosition(client, getGameConfig().locations[getGame()][gameLocationId][1]);
|
setPlayerPosition(client, getGameConfig().locations[getGame()][gameLocationId][1]);
|
||||||
|
setPlayerHeading(client, getGameConfig().locations[getGame()][gameLocationId][1]);
|
||||||
setPlayerInterior(client, 0);
|
setPlayerInterior(client, 0);
|
||||||
setPlayerDimension(client, 0);
|
setPlayerDimension(client, 0);
|
||||||
updateInteriorLightsForPlayer(client, true);
|
updateInteriorLightsForPlayer(client, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user