max-mapper / voxel-server

multiplayer server for voxel-engine
74 stars 25 forks source link

When opening a second instance, app throws "Uncaught TypeError: Cannot call method 'createPlayerObject' of undefined" #3

Closed chrisekelley closed 11 years ago

chrisekelley commented 11 years ago

updatePlayerPosition tries to access viking but it was initiated as a local var.

var viking = skin(game.THREE, 'viking.png')

In earlier versions, viking was in the global scope and was a property of window. To fix, I've added viking as a property to game. Sending a pull request.