Compare commits
No commits in common. "43e2a151978a670d4bf4ca7850fb17ba61def072" and "9f35dc7ddd7a6b07b74d9e9415b909c5f8e2708f" have entirely different histories.
43e2a15197
...
9f35dc7ddd
2 changed files with 9 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "polaris-task-force",
|
||||
"version": "0.2.2",
|
||||
"version": "0.2.1",
|
||||
"description": "Web app for the Arma 3 unit Polaris Task Force. Uses Next.js for client- and server-side rendering, with a Postgres database and some other neat libraries.",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
|
|
|
|||
|
|
@ -325,9 +325,9 @@ export function AimTrainerGame({
|
|||
}, [resetToReady, startGame]);
|
||||
|
||||
const handleRestartAction = useCallback(() => {
|
||||
if (phaseRef.current === "ready") return;
|
||||
resetToReady();
|
||||
}, [resetToReady]);
|
||||
if (phaseRef.current !== "playing") return;
|
||||
startGame();
|
||||
}, [startGame]);
|
||||
|
||||
const handleShot = useCallback(
|
||||
(event: PointerEvent<HTMLCanvasElement>) => {
|
||||
|
|
@ -458,7 +458,10 @@ export function AimTrainerGame({
|
|||
if (remaining === 0) {
|
||||
finish();
|
||||
} else {
|
||||
const displayedSecond = Math.ceil(remaining / 1000);
|
||||
const displayedSecond =
|
||||
remaining <= FINAL_COUNTDOWN_WINDOW_MS
|
||||
? Math.ceil(remaining / 1000)
|
||||
: COURSE_DURATION_SECONDS;
|
||||
if (displayedSecond !== game.lastDisplayedSecond) {
|
||||
game.lastDisplayedSecond = displayedSecond;
|
||||
setTimerSeconds(displayedSecond);
|
||||
|
|
@ -725,7 +728,7 @@ export function AimTrainerGame({
|
|||
</div>
|
||||
<div className="text-xs text-muted-foreground">
|
||||
Headshots score {HEADSHOT_POINTS} · torso hits score {TORSO_POINTS} · civilians cost{" "}
|
||||
{CIVILIAN_PENALTY}. Press R to reset the lane.
|
||||
{CIVILIAN_PENALTY}. Press R to restart the lane.
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
|
|
|||
Loading…
Reference in a new issue