huge optimization to network

This commit is contained in:
biglyderv 2025-01-03 14:54:49 -05:00
parent 9c2deb3dcb
commit 8cc663d9a7
2 changed files with 5 additions and 3 deletions

View file

@ -12,10 +12,10 @@ class Shooter extends Entity {
this.immortal = true;
this.serverProps = [
'type', 'pos', 'vel', 'you', 'immortal', 'dir'
'type', 'pos', 'vel', 'immortal', 'dir'
];
this.dir = Math.random() * 696969;
this.dir = Math.random() * 6969;
}
handleTick(game) {
this.ticks++;

View file

@ -181,7 +181,9 @@ class Game extends GameBasic {
na.push(JSON.stringify([this.width, this.height]))
client.send(`[${na.join(',')}]`);
let dd = `[${na.join(',')}]`;
client.send(dd);
wsEnt.isYou = false;
}