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...
|
To warn players when night is approaching...
|
||||||
|
|
||||||
utils.at( "19:00", function() {
|
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){
|
utils.foreach( server.onlinePlayers, function(player){
|
||||||
player.chat("The night is dark and full of terrors!");
|
player.chat("The night is dark and full of terrors!");
|
||||||
});
|
});
|
||||||
|
|
||||||
}, self.world);
|
}, self.world);
|
||||||
|
|
||||||
String class extensions
|
String class extensions
|
||||||
|
|
|
@ -700,12 +700,15 @@ Used when placing torches so that they face towards the drone.
|
||||||
this.record = false;
|
this.record = false;
|
||||||
var usePlayerCoords = false;
|
var usePlayerCoords = false;
|
||||||
var playerPos = getPlayerPos();
|
var playerPos = getPlayerPos();
|
||||||
if (typeof x == "undefined"){
|
if (typeof x == "undefined")
|
||||||
|
{
|
||||||
var mp = getMousePos();
|
var mp = getMousePos();
|
||||||
if (mp){
|
if (mp){
|
||||||
this.x = mp.x;
|
this.x = mp.x;
|
||||||
this.y = mp.y;
|
this.y = mp.y;
|
||||||
this.z = mp.z;
|
this.z = mp.z;
|
||||||
|
if (playerPos)
|
||||||
|
this.dir = _getDirFromRotation(playerPos.yaw);
|
||||||
this.world = mp.world;
|
this.world = mp.world;
|
||||||
}else{
|
}else{
|
||||||
// base it on the player's current location
|
// 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.x = playerPos.x;
|
||||||
this.y = playerPos.y;
|
this.y = playerPos.y;
|
||||||
this.z = playerPos.z;
|
this.z = playerPos.z;
|
||||||
|
this.dir = _getDirFromRotation(playerPos.yaw);
|
||||||
this.world = playerPos.world;
|
this.world = playerPos.world;
|
||||||
}
|
}
|
||||||
}else{
|
}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){
|
if (usePlayerCoords){
|
||||||
this.fwd(3);
|
this.fwd(3);
|
||||||
}
|
}
|
||||||
this.chkpt('start');
|
this.chkpt('start');
|
||||||
this.record = true;
|
this.record = true;
|
||||||
this.history = [];
|
this.history = [];
|
||||||
|
// for debugging
|
||||||
|
// self.sendMessage("New Drone " + this.toString());
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
//
|
//
|
||||||
|
|
|
@ -178,10 +178,11 @@ Example
|
||||||
To warn players when night is approaching...
|
To warn players when night is approaching...
|
||||||
|
|
||||||
utils.at( "19:00", function() {
|
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){
|
utils.foreach( server.onlinePlayers, function(player){
|
||||||
player.chat("The night is dark and full of terrors!");
|
player.chat("The night is dark and full of terrors!");
|
||||||
});
|
});
|
||||||
|
|
||||||
}, self.world);
|
}, self.world);
|
||||||
|
|
||||||
***/
|
***/
|
||||||
|
|
Reference in a new issue