diff options
author | Tyler Murphy <tylerm@tylerm.dev> | 2023-06-29 20:29:54 -0400 |
---|---|---|
committer | Tyler Murphy <tylerm@tylerm.dev> | 2023-06-29 20:29:54 -0400 |
commit | c66865d431532330194f6b845160e01a7ba003ab (patch) | |
tree | 99e1e6384592371089fd1aefc388b96b22107b82 /client/src/logic/movement.ts | |
parent | update dockerfile (diff) | |
download | tuxman-c66865d431532330194f6b845160e01a7ba003ab.tar.gz tuxman-c66865d431532330194f6b845160e01a7ba003ab.tar.bz2 tuxman-c66865d431532330194f6b845160e01a7ba003ab.zip |
when players die, they should acutally fucking die
Diffstat (limited to '')
-rw-r--r-- | client/src/logic/movement.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/client/src/logic/movement.ts b/client/src/logic/movement.ts index 726f87a..32956f9 100644 --- a/client/src/logic/movement.ts +++ b/client/src/logic/movement.ts @@ -193,6 +193,11 @@ const updateCollision = (data: GameState) => { for (let i = 0; i < num - 1; i++) { for (let j = i + 1; j < num; j++) { + + if (players[i].dead || players[j].dead) { + continue + } + let rot = checkBoundingBox(bb[i], bb[j]) if (rot == Rotation.NOTHING) { continue @@ -224,6 +229,10 @@ export const updateMovement = (data: GameState) => { const player = data.players[id] + if (!player || player.dead) { + continue + } + if (player.thiccLeft > 0) { player.thiccLeft-- } |