diff --git a/server/client.go b/server/client.go index da95224..c93efb8 100644 --- a/server/client.go +++ b/server/client.go @@ -33,6 +33,8 @@ const ( maxMessageSize = 4096 maxPictures = 1000 + + defaultFacing = 2 // down ) type Picture struct { @@ -303,7 +305,7 @@ func (c *RoomClient) disconnect() { func (c *RoomClient) reset() { c.x = -1 c.y = -1 - c.facing = 0 + c.facing = defaultFacing c.speed = 0 c.flash = [5]int{} diff --git a/server/room.go b/server/room.go index 0187274..677bccb 100644 --- a/server/room.go +++ b/server/room.go @@ -341,7 +341,7 @@ func (c *RoomClient) getPlayerData(client *RoomClient) { if client.x != -1 { c.outbox <- buildMsg("m", client.session.id, client.x, client.y) } - if client.facing != 0 { + if client.facing != defaultFacing { c.outbox <- buildMsg("f", client.session.id, client.facing) } if client.speed != 0 {