mirror of
https://github.com/OpenLiberty/liberty-bikes.git
synced 2024-11-27 01:20:01 +08:00
Fix players jumping around when one dies and on start
This commit is contained in:
parent
80cb7a4364
commit
bd03116e44
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user