better car crash

This commit is contained in:
Atsuyo-INSA 2023-12-07 19:10:46 +01:00
parent 87d078a34d
commit c5e4d1a6b9

View file

@ -142,7 +142,6 @@ function game() {
playerId=Net.playerId;
player=Net.clientPlayer;
players=Net.getPlayersToAdd();
players.push(new Player(0,-50,-50,"VOITURE",0,null));
Renderer.AddPlayer(player)
Renderer.SetPlayerId(player.id)
@ -153,6 +152,7 @@ function game() {
players.forEach((p) => {
Renderer.AddPlayer(p)
});
players.push(new Player(-1,-50,-50,"VOITURE",0,null));
LB.ReloadAff(players, player);
}
}
@ -172,8 +172,9 @@ function game() {
c.Update();
if(c.collide(player.x,player.y))
{
Net.died(player.id,0);
Net.died(player.id,-1);
player.x=-50;
player.health=10;
}
});
updateBullets(dt);