Hitting !!

This commit is contained in:
2026-09-30 15:41:30 -03:00
parent 3af5f6e54b
commit 5e2b415f5c
9 changed files with 82 additions and 7 deletions
+4
View File
@@ -302,6 +302,8 @@ export class Client {
}
} else if (InputManager.is_mouse_pressed(2)) {
this.game_mode.use_item();
} else if (!this.entity_hit && InputManager.is_mouse_pressed(0)) {
this.game_mode.swing();
}
}
@@ -323,6 +325,8 @@ export class Client {
if (inventories.hotbar_selected !== previous) {
this.connection.send({ type: "select_slot", slot: inventories.hotbar_selected });
// the server starts the attack cooldown over too
this.player.last_attack = performance.now();
}
}
}