fix issue #90
This commit is contained in:
parent
c7b2786a8a
commit
5a415d9838
3 changed files with 11 additions and 5 deletions
|
@ -1389,10 +1389,11 @@ Example
|
|||
To warn players when night is approaching...
|
||||
|
||||
utils.at( "19:00", function() {
|
||||
/* it's 7 in the evening so warn all players that night is coming ! */
|
||||
|
||||
utils.foreach( server.onlinePlayers, function(player){
|
||||
player.chat("The night is dark and full of terrors!");
|
||||
});
|
||||
|
||||
}, self.world);
|
||||
|
||||
String class extensions
|
||||
|
|
|
@ -700,12 +700,15 @@ Used when placing torches so that they face towards the drone.
|
|||
this.record = false;
|
||||
var usePlayerCoords = false;
|
||||
var playerPos = getPlayerPos();
|
||||
if (typeof x == "undefined"){
|
||||
if (typeof x == "undefined")
|
||||
{
|
||||
var mp = getMousePos();
|
||||
if (mp){
|
||||
this.x = mp.x;
|
||||
this.y = mp.y;
|
||||
this.z = mp.z;
|
||||
if (playerPos)
|
||||
this.dir = _getDirFromRotation(playerPos.yaw);
|
||||
this.world = mp.world;
|
||||
}else{
|
||||
// base it on the player's current location
|
||||
|
@ -720,6 +723,7 @@ Used when placing torches so that they face towards the drone.
|
|||
this.x = playerPos.x;
|
||||
this.y = playerPos.y;
|
||||
this.z = playerPos.z;
|
||||
this.dir = _getDirFromRotation(playerPos.yaw);
|
||||
this.world = playerPos.world;
|
||||
}
|
||||
}else{
|
||||
|
@ -746,14 +750,14 @@ Used when placing torches so that they face towards the drone.
|
|||
}
|
||||
}
|
||||
|
||||
// for debugging
|
||||
//self.sendMessage("New Drone " + this.toString());
|
||||
if (usePlayerCoords){
|
||||
this.fwd(3);
|
||||
}
|
||||
this.chkpt('start');
|
||||
this.record = true;
|
||||
this.history = [];
|
||||
// for debugging
|
||||
// self.sendMessage("New Drone " + this.toString());
|
||||
return this;
|
||||
};
|
||||
//
|
||||
|
|
|
@ -178,10 +178,11 @@ Example
|
|||
To warn players when night is approaching...
|
||||
|
||||
utils.at( "19:00", function() {
|
||||
/* it's 7 in the evening so warn all players that night is coming ! */
|
||||
|
||||
utils.foreach( server.onlinePlayers, function(player){
|
||||
player.chat("The night is dark and full of terrors!");
|
||||
});
|
||||
|
||||
}, self.world);
|
||||
|
||||
***/
|
||||
|
|
Reference in a new issue