Fix players jumping around when one dies and on start

This commit is contained in:
Liam Westby 2018-05-18 08:33:24 -05:00
parent 80cb7a4364
commit bd03116e44

View File

@ -125,7 +125,7 @@ export class GameComponent implements OnInit, OnDestroy {
}
this.players.set(playerInfo.id, newPlayer);
newPlayer.update(playerInfo.x * Constants.BOX_SIZE, playerInfo.y * Constants.BOX_SIZE, playerInfo.direction);
newPlayer.update(playerInfo.x * Constants.BOX_SIZE + (playerInfo.width / 2) * Constants.BOX_SIZE, playerInfo.y * Constants.BOX_SIZE + (playerInfo.width / 2) * Constants.BOX_SIZE, playerInfo.direction);
newPlayer.addTo(this.stage);
}