Fixed weird things when window lost focus

This commit is contained in:
Klemek
2019-01-08 08:14:27 +01:00
parent 701a53b3f1
commit bfe9a4623e
2 changed files with 11 additions and 0 deletions
+4
View File
@@ -160,6 +160,10 @@ io.on('connection', function (socket) {
hsize:HSIZE
});
socket.on('history', function () {
socket.emit('history', history);
});
socket.on('disconnect', function () {
delete players[socket.name];
delete history[socket.name];