summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2013-01-24 18:03:14 -0500
committerJules Laplace <jules@okfoc.us>2013-01-24 18:03:14 -0500
commit5fb02fcc216abb44250b8d4a919270eea51174e8 (patch)
treea78cc7d121cf4526e857d55c514a365b86755ccd
parent6e53ebee3b946acbacb584fd41022232ede1082d (diff)
dupe cursor fix
-rw-r--r--app.js2
-rw-r--r--public/javascripts/game.js16
2 files changed, 9 insertions, 9 deletions
diff --git a/app.js b/app.js
index d6c2a6c..81f87b4 100644
--- a/app.js
+++ b/app.js
@@ -188,7 +188,7 @@ io.sockets.on('connection', function (socket) {
connected: now,
current: 0,
active: true,
- x: -9999,
+ x: 0,
y: -9999
};
diff --git a/public/javascripts/game.js b/public/javascripts/game.js
index 6211758..90e3a67 100644
--- a/public/javascripts/game.js
+++ b/public/javascripts/game.js
@@ -117,14 +117,14 @@ var UI = {
var user = data.users[i];
if (!( user.id in users )) {
users[user.id] = user;
- }
- if (user.id != _id && ! user.cursor) {
- var cursor = new Cursor( user, now );
- user.cursor = cursor;
- user.cursor.el.css({ 'margin-right': -user.x, 'margin-bottom': -user.y });
- }
- else if (user.id == _id && own_cursor) {
- own_cursor.name.html( user.firstname );
+ if (user.id != _id && ! user.cursor) {
+ var cursor = new Cursor( user, now );
+ user.cursor = cursor;
+ user.cursor.el.css({ 'margin-right': -user.x, 'margin-bottom': -user.y });
+ }
+ else if (user.id == _id && own_cursor) {
+ own_cursor.name.html( user.firstname );
+ }
}
}
},