@korial29/tiny-fps 0.172.1 → 0.173.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.js CHANGED
@@ -1627,8 +1627,8 @@ var cling = (p, w, c) => {
1627
1627
  var tailing = (p) => !!p.swing && p.cut !== BLOW.CLAW_L && p.cut !== BLOW.CLAW_R;
1628
1628
  /**
1629
1629
  * The xenomorph's dash: DASH held on a floor or a wall, with the dash timer run out, charges a
1630
- * pounce (`charge`); let go, it leaps along the look, at least POUNCE_PITCH up, faster the longer
1631
- * the charge. Anywhere else, or stumbling, the charge is lost.
1630
+ * pounce (`charge`); let go, it leaps toward the keys held (the look with none: the user,
1631
+ * 2026-11-16), at least POUNCE_PITCH up, faster the longer the charge. Anywhere else, or stumbling, the charge is lost.
1632
1632
  */
1633
1633
  var pounce = (p, c) => {
1634
1634
  if (tailing(p)) return;
@@ -1644,8 +1644,9 @@ var pounce = (p, c) => {
1644
1644
  if (p.mode !== MODE.CLING) p.wall = SIDE$1.NONE;
1645
1645
  p.ev |= p.mode === MODE.SLIDE ? EV.SLIDE_END : 0;
1646
1646
  enter(p, MODE.AIR);
1647
- p.vx = c.fx * cp * v;
1648
- p.vz = c.fz * cp * v;
1647
+ const [dx, dz] = c.wx || c.wz ? [c.wx, c.wz] : [c.fx, c.fz];
1648
+ p.vx = dx * cp * v;
1649
+ p.vz = dz * cp * v;
1649
1650
  leap$1(p, Math.sin(pitch) * v);
1650
1651
  p.dash = POUNCE_COOL;
1651
1652
  p.ev |= EV.DASH;
@@ -261,7 +261,7 @@ export declare const PUNCH_HITS: number, PUNCH_STUN: number, PUNCH_MEMORY: numbe
261
261
  * forward and the sprint held (MODE.CLING, physics.ts; the sprint since the user, 2026-11-16): CLING_SPEED m/s up, down or along it while the wall rises
262
262
  * CLING_HOLD m over its feet; a jump kicks it off along the look at CLING_LEAP m/s. DASH held on a
263
263
  * floor or a wall charges a pounce for up to POUNCE_HOLD ticks (PlayerState.charge); let go, it
264
- * leaps POUNCE_MIN to POUNCE_MAX m/s along the look, at least POUNCE_PITCH up, and the dash timer
264
+ * leaps POUNCE_MIN to POUNCE_MAX m/s toward the keys held (the look with none), at least POUNCE_PITCH up, and the dash timer
265
265
  * runs from POUNCE_COOL: the first POUNCE_FLY ticks of it in the air, an enemy it reaches is
266
266
  * pinned (room.ts): POUNCE_HP health, his flag dropped, a stumble of POUNCE_STUN ticks. An enemy
267
267
  * whose katana or fists hit it loses ACID_HP.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@korial29/tiny-fps",
3
3
  "description": "Tiny multiplayer first-person rooftop game for the browser: raw WebGL, zero runtime dependencies, WebSocket or same-browser multi-tab play.",
4
4
  "license": "Apache-2.0",
5
- "version": "0.172.1",
5
+ "version": "0.173.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"
@@ -67,7 +67,8 @@
67
67
  "lint": "npm run lint:prettier && npm run lint:eslint && npm run lint:tsc",
68
68
  "format": "npm run format:prettier && npm run format:eslint",
69
69
  "test": "vitest run --coverage",
70
- "test:ci": "vitest run --coverage --passWithNoTests",
70
+ "test:ci": "vitest run --maxWorkers=100% --passWithNoTests",
71
+ "test:durations": "vitest run --reporter=json --outputFile=node_modules/.cache/vitest-report.json && node scripts/durations.mjs node_modules/.cache/vitest-report.json",
71
72
  "test:watch": "vitest --watch"
72
73
  },
73
74
  "devDependencies": {