@korial29/tiny-fps 0.211.0 → 0.212.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/index.js +6 -6
- package/dist/local.js +1 -1
- package/dist/server.js +10 -8
- package/dist/types/shared/constants.d.ts +6 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -6893,11 +6893,8 @@ var step = (p, i, w, team, armed = true, bodies = [], kit = KITS[0]) => {
|
|
|
6893
6893
|
];
|
|
6894
6894
|
const own = kit.hunter;
|
|
6895
6895
|
if (own) {
|
|
6896
|
-
[p.rifle, p.
|
|
6897
|
-
|
|
6898
|
-
0,
|
|
6899
|
-
0
|
|
6900
|
-
];
|
|
6896
|
+
[p.rifle, p.nades] = [0, 0];
|
|
6897
|
+
p.clip = Math.max(0, (p.clip ?? 0) - 1);
|
|
6901
6898
|
if (p.ammo < 0 && !p.down) [p.ammo, p.mag, p.cap, p.rail] = [
|
|
6902
6899
|
kit.ammo,
|
|
6903
6900
|
kit.mag,
|
|
@@ -6932,7 +6929,7 @@ var step = (p, i, w, team, armed = true, bodies = [], kit = KITS[0]) => {
|
|
|
6932
6929
|
[p.mag, p.cap, p.clip] = [
|
|
6933
6930
|
Math.min(p.mag ?? 0, kit.mag),
|
|
6934
6931
|
Math.min(p.cap ?? 0, kit.cap),
|
|
6935
|
-
Math.min(p.clip ?? 0, kit.clip)
|
|
6932
|
+
own ? p.clip : Math.min(p.clip ?? 0, kit.clip)
|
|
6936
6933
|
];
|
|
6937
6934
|
p.cool = Math.max(0, p.cool - 1);
|
|
6938
6935
|
p.lob = Math.max(0, (p.lob ?? 0) - 1);
|
|
@@ -7059,8 +7056,8 @@ var step = (p, i, w, team, armed = true, bodies = [], kit = KITS[0]) => {
|
|
|
7059
7056
|
[p.swing, p.charge] = [CUTS[p.cut].ticks, 0];
|
|
7060
7057
|
launch(p);
|
|
7061
7058
|
} else if (p.rifled && own) {
|
|
7062
|
-
if (!p.
|
|
7063
|
-
p.
|
|
7059
|
+
if (!p.clip) {
|
|
7060
|
+
p.clip = 120;
|
|
7064
7061
|
p.shots = p.shots + 1 & 255;
|
|
7065
7062
|
return STRIKE.DISK;
|
|
7066
7063
|
}
|
|
@@ -10235,6 +10232,10 @@ var Room = class {
|
|
|
10235
10232
|
b.y,
|
|
10236
10233
|
b.z
|
|
10237
10234
|
];
|
|
10235
|
+
if ((b.power === 9 || b.power === 10) && by && !by.state.clip) {
|
|
10236
|
+
b.burst = true;
|
|
10237
|
+
return;
|
|
10238
|
+
}
|
|
10238
10239
|
if (b.returning || b.power === 10) {
|
|
10239
10240
|
if (!by) {
|
|
10240
10241
|
b.burst = true;
|
|
@@ -10248,6 +10249,7 @@ var Room = class {
|
|
|
10248
10249
|
const distance = Math.hypot(...delta);
|
|
10249
10250
|
if (distance < .65) {
|
|
10250
10251
|
b.burst = true;
|
|
10252
|
+
by.state.clip = 0;
|
|
10251
10253
|
return;
|
|
10252
10254
|
}
|
|
10253
10255
|
[b.dx, b.dy, b.dz] = delta.map((v) => v / distance);
|
|
@@ -383,7 +383,12 @@ export declare const DISK_SPEED = 52;
|
|
|
383
383
|
export declare const DISK_RANGE = 28;
|
|
384
384
|
export declare const DISK_R = 0.16;
|
|
385
385
|
export declare const DISK_HP = 3;
|
|
386
|
-
|
|
386
|
+
/**
|
|
387
|
+
* Ticks a thrown disc may stay out (the user, 2026-11-24): it can be thrown again only once it is
|
|
388
|
+
* back in the hand, and one that has not come back by then (stuck) is in the hand again. Counted
|
|
389
|
+
* down in the Hunter's `clip` (gun.ts), which his disc's slot takes from the laser rifle.
|
|
390
|
+
*/
|
|
391
|
+
export declare const DISK_LOST: number;
|
|
387
392
|
/** Ticks a Hunter must keep a target in the shoulder laser's sight to lock on. */
|
|
388
393
|
export declare const HUNTER_LASER_LOCK: number;
|
|
389
394
|
/** Damage dealt by a locked Hunter shoulder laser. */
|
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.
|
|
5
|
+
"version": "0.212.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|