jbillmann / GarageServer.IO

A simple, lightweight, HTML multiplayer game server (and client) for Node.js
MIT License
181 stars 29 forks source link

Player state always empty #23

Closed englercj closed 9 years ago

englercj commented 9 years ago

https://github.com/jbillmann/GarageServer.IO/blob/master/lib/entities/player.js#L19

On this line it overrrides addState from entity. This means that the line in entity that sets the state:

https://github.com/jbillmann/GarageServer.IO/blob/master/lib/entities/entity.js#L17

Never runs, so this.state is always an empty object and the player state never reaches the client. Needs to add this.state = state to the player addState() method.