Run the interval on the clientside instead of the server side

This commit is contained in:
AlexKvazos
2015-04-30 00:42:50 -05:00
parent f3683b4e8e
commit 29467f73b3
7 changed files with 22 additions and 35 deletions
+1
View File
@@ -4,6 +4,7 @@ module.exports = function(socket) {
socket.mcbot.on('spawn', function() {
var pos = socket.mcbot.entity.position;
socket.emit('buffer:info', 'Spawned at X:' + pos.x + ', Y:' + pos.y + ', Z:' + pos.z);
socket.emit('bot:players', socket.mcbot.players);
socket.emit('bot:spawn');
});