Only auto aim and healthbars

This commit is contained in:
armel committed 2026-09-07 23:02:47 +02:00
1 parent 54c6327ac7
commit a914bd74fe
14 files changed
+95 -89

No files matched your search

+2 -3
View File
@@ -240,7 +240,6 @@ final class GameSimulator
$keys = is_array($frame['keys'] ?? null) ? $frame['keys'] : [];
$input->keys = array_values(array_filter($keys, 'is_string'));
$input->fire = (bool) ($frame['fire'] ?? false);
$input->autoAim = (bool) ($frame['autoAim'] ?? false);
$aim = $frame['aim'] ?? null;
if (is_array($aim)) {
@@ -265,10 +264,8 @@ final class GameSimulator
$entry['engine']->tick($dt);
if ($room->state === Room::STATE_OVER) {
$room->seq++;
$this->broadcastRoom($room);
} elseif ($this->frame % self::SNAPSHOT_EVERY === 0) {
$room->seq++;
$this->broadcastRoom($room);
}
}
@@ -280,6 +277,8 @@ final class GameSimulator
return;
}
$room->seq++;
$players = [];
foreach ($room->players as $player) {
$players[] = $player->toSnapshot();