@korial29/tiny-fps 0.206.0 → 0.207.1
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 +5 -5
- package/dist/local.js +1 -1
- package/dist/server.js +85 -36
- package/dist/types/client/beams.d.ts +2 -0
- package/dist/types/client/combat.d.ts +3 -1
- package/dist/types/client/hud.d.ts +6 -4
- package/dist/types/client/hunter.d.ts +2 -0
- package/dist/types/client/input.d.ts +3 -3
- package/dist/types/client/sfx.d.ts +16 -0
- package/dist/types/shared/constants.d.ts +2 -2
- package/dist/types/shared/gun.d.ts +8 -0
- package/dist/types/shared/room.d.ts +6 -3
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -6943,8 +6943,9 @@ var step = (p, i, w, team, armed = true, bodies = [], kit = KITS[0]) => {
|
|
|
6943
6943
|
(p.rifle ?? -1) >= 0
|
|
6944
6944
|
];
|
|
6945
6945
|
const want = i.keys & KEY.BLADE ? 1 : i.keys & KEY.RAIL ? 2 : i.keys & KEY.RIFLE ? 3 : 0;
|
|
6946
|
-
const fists = gear && !!(i.keys & KEY.FISTS) && !(p.swing && p.wield);
|
|
6947
|
-
const
|
|
6946
|
+
const fists = gear && !own && !!(i.keys & KEY.FISTS) && !(p.swing && p.wield);
|
|
6947
|
+
const first = own && has[1] ? 1 : has.indexOf(true);
|
|
6948
|
+
const hand = p.swing && p.wield ? 1 : fists ? -1 : has[want] ? want : first;
|
|
6948
6949
|
if (hand != (p.fists ? -1 : p.rifled ? 3 : p.railed ? 2 : +!!p.wield)) p.reload = 0;
|
|
6949
6950
|
if (p.swing && hand >= 0 && !p.wield) p.swing = 0;
|
|
6950
6951
|
[p.wield, p.railed, p.rifled, p.fists] = [
|
|
@@ -7041,8 +7042,13 @@ var step = (p, i, w, team, armed = true, bodies = [], kit = KITS[0]) => {
|
|
|
7041
7042
|
p.shots = p.shots + 1 & 255;
|
|
7042
7043
|
return STRIKE.LASER;
|
|
7043
7044
|
}
|
|
7044
|
-
} else if (p.railed && own)
|
|
7045
|
-
|
|
7045
|
+
} else if (p.railed && own) {
|
|
7046
|
+
if (!p.cool) {
|
|
7047
|
+
p.cool = 15;
|
|
7048
|
+
p.shots = p.shots + 1 & 255;
|
|
7049
|
+
return STRIKE.RAIL;
|
|
7050
|
+
}
|
|
7051
|
+
} else if (p.railed) {
|
|
7046
7052
|
if (p.cap && !p.reload && !p.hot) {
|
|
7047
7053
|
p.heat = (p.heat ?? 0) + 1;
|
|
7048
7054
|
p.hot = p.heat >= 120;
|
|
@@ -7078,6 +7084,30 @@ var step = (p, i, w, team, armed = true, bodies = [], kit = KITS[0]) => {
|
|
|
7078
7084
|
return STRIKE.NONE;
|
|
7079
7085
|
};
|
|
7080
7086
|
/**
|
|
7087
|
+
* The half width and height of the screen as the shoulder cannon's lock reads it, as the tangents
|
|
7088
|
+
* of the look's half angles: a 70° view high on a 16:9 screen. Host and client share it, so the
|
|
7089
|
+
* lock breaks on both when the target leaves it.
|
|
7090
|
+
*/
|
|
7091
|
+
var SCREEN = [1.2, .7];
|
|
7092
|
+
/** Whether `point` is on the screen of an eye at `eye` looking along `yaw` and `pitch` (SCREEN). */
|
|
7093
|
+
var onScreen = (eye, yaw, pitch, point) => {
|
|
7094
|
+
const [cp, sp, cy, sy] = [
|
|
7095
|
+
Math.cos(pitch),
|
|
7096
|
+
Math.sin(pitch),
|
|
7097
|
+
Math.cos(yaw),
|
|
7098
|
+
Math.sin(yaw)
|
|
7099
|
+
];
|
|
7100
|
+
const d = [
|
|
7101
|
+
0,
|
|
7102
|
+
1,
|
|
7103
|
+
2
|
|
7104
|
+
].map((i) => point[i] - eye[i]);
|
|
7105
|
+
const z = -d[0] * sy * cp + d[1] * sp - d[2] * cy * cp;
|
|
7106
|
+
const x = d[0] * cy - d[2] * sy;
|
|
7107
|
+
const y = d[0] * sy * sp + d[1] * cp + d[2] * cy * sp;
|
|
7108
|
+
return z > 0 && Math.abs(x) < SCREEN[0] * z && Math.abs(y) < SCREEN[1] * z;
|
|
7109
|
+
};
|
|
7110
|
+
/**
|
|
7081
7111
|
* The xenomorph's blows: FIRE swipes the left claws, then the right while it goes on, a fresh press
|
|
7082
7112
|
* after a swipe's strike throwing the next at once (BLOW). The right button (KEY.BLADE) strikes with
|
|
7083
7113
|
* the tail as FIRE cuts with the katana (TAILS): by the keys (cutOf()), its special with SPECIAL (a
|
|
@@ -9608,8 +9638,6 @@ var Room = class {
|
|
|
9608
9638
|
gone;
|
|
9609
9639
|
/** The plasma balls in flight, and the ones that burst since the last snapshot, which sends them once more. */
|
|
9610
9640
|
balls = [];
|
|
9611
|
-
/** Last tick a Hunter's shoulder laser hit, by player id. */
|
|
9612
|
-
hunterLasers = /* @__PURE__ */ new Map();
|
|
9613
9641
|
/** Target and start tick of each Hunter's uninterrupted shoulder-laser lock. */
|
|
9614
9642
|
hunterLocks = /* @__PURE__ */ new Map();
|
|
9615
9643
|
/** The map's rovers, in the order of WorldDef.rovers, then its ships (ship.ts). */
|
|
@@ -9847,13 +9875,15 @@ var Room = class {
|
|
|
9847
9875
|
this.hunterLocks.delete(p.info.id);
|
|
9848
9876
|
continue;
|
|
9849
9877
|
}
|
|
9850
|
-
const target = this.shoulderTarget(p, void 0);
|
|
9851
9878
|
const lock = this.hunterLocks.get(p.info.id);
|
|
9852
|
-
if (!target) this.hunterLocks.delete(p.info.id);
|
|
9853
|
-
|
|
9854
|
-
target
|
|
9855
|
-
|
|
9856
|
-
|
|
9879
|
+
if (lock && !this.lockedOn(p, lock.target, void 0)) this.hunterLocks.delete(p.info.id);
|
|
9880
|
+
if (!this.hunterLocks.has(p.info.id)) {
|
|
9881
|
+
const target = this.shoulderTarget(p, void 0);
|
|
9882
|
+
if (target) this.hunterLocks.set(p.info.id, {
|
|
9883
|
+
target: target.id,
|
|
9884
|
+
since: now
|
|
9885
|
+
});
|
|
9886
|
+
}
|
|
9857
9887
|
}
|
|
9858
9888
|
for (const b of this.balls) if (!b.burst && b.left > 0) this.fly(b, stepOf(b));
|
|
9859
9889
|
this.heal(players);
|
|
@@ -10462,34 +10492,53 @@ var Room = class {
|
|
|
10462
10492
|
}
|
|
10463
10493
|
return target;
|
|
10464
10494
|
}
|
|
10465
|
-
/**
|
|
10466
|
-
|
|
10467
|
-
const
|
|
10468
|
-
const
|
|
10469
|
-
if (!target || lock?.target !== target.id || this.ticks - lock.since < 180 || this.ticks - (this.hunterLasers.get(p.info.id) ?? -Infinity) < 18) return;
|
|
10470
|
-
const origin = [
|
|
10495
|
+
/** The enemy `id` as `p` saw him at `view`, while he is up, in range and on p's screen (onScreen()). */
|
|
10496
|
+
lockedOn(p, id, view) {
|
|
10497
|
+
const foe = this.enemies(p, view).find((q) => q.id === id);
|
|
10498
|
+
const eye = [
|
|
10471
10499
|
p.state.x,
|
|
10472
10500
|
p.state.y + eyeHeight(p.state),
|
|
10473
10501
|
p.state.z
|
|
10474
10502
|
];
|
|
10475
|
-
const
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
]
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10503
|
+
const point = foe && [
|
|
10504
|
+
foe.x,
|
|
10505
|
+
foe.y + eyeHeight(foe) * .65,
|
|
10506
|
+
foe.z
|
|
10507
|
+
];
|
|
10508
|
+
return foe && point && !foe.down && Math.hypot(...point.map((v, i) => v - eye[i])) < 80 && onScreen(eye, p.state.yaw, p.state.pitch, point) ? foe : void 0;
|
|
10509
|
+
}
|
|
10510
|
+
/**
|
|
10511
|
+
* A shot of the shoulder cannon (gun.ts paces them): at the foe locked on for HUNTER_LASER_LOCK,
|
|
10512
|
+
* else straight down the look. The first enemy in its line takes HUNTER_LASER_HP.
|
|
10513
|
+
*/
|
|
10514
|
+
shoulder(p, view) {
|
|
10515
|
+
const lock = this.hunterLocks.get(p.info.id);
|
|
10516
|
+
const target = lock && this.ticks - lock.since >= 180 ? this.lockedOn(p, lock.target, view) : void 0;
|
|
10517
|
+
let aim = p.state;
|
|
10518
|
+
if (target) {
|
|
10519
|
+
const origin = [
|
|
10520
|
+
p.state.x,
|
|
10521
|
+
p.state.y + eyeHeight(p.state),
|
|
10522
|
+
p.state.z
|
|
10523
|
+
];
|
|
10524
|
+
const delta = [
|
|
10525
|
+
target.x,
|
|
10526
|
+
target.y + eyeHeight(target) * .65,
|
|
10527
|
+
target.z
|
|
10528
|
+
].map((v, i) => v - origin[i]);
|
|
10529
|
+
const distance = Math.hypot(...delta) || 1;
|
|
10530
|
+
aim = {
|
|
10531
|
+
...p.state,
|
|
10532
|
+
yaw: Math.atan2(-delta[0], -delta[2]),
|
|
10533
|
+
pitch: Math.asin(delta[1] / distance)
|
|
10534
|
+
};
|
|
10535
|
+
}
|
|
10536
|
+
const aimed = beam(this.world, aim, this.enemies(p, view));
|
|
10537
|
+
const foe = this.players().find((q) => q.info.id === aimed.hit?.id);
|
|
10538
|
+
if (foe) {
|
|
10539
|
+
p.state.hits = p.state.hits + 1 & 255;
|
|
10540
|
+
this.shot(foe, 3, p, aimed.d[0], aimed.d[2]);
|
|
10541
|
+
}
|
|
10493
10542
|
}
|
|
10494
10543
|
/**
|
|
10495
10544
|
* The rail gun's ring of `p` at the view tick `view`: every enemy within RING_R of him as `p` drew
|
|
@@ -29,6 +29,8 @@ export interface Tracer {
|
|
|
29
29
|
a: Vec3;
|
|
30
30
|
b: Vec3;
|
|
31
31
|
}[]): void;
|
|
32
|
+
/** The Hunter's shoulder cannon's shot from `a` to `b`: a straight red beam that fades in CANNON seconds. */
|
|
33
|
+
laser(a: Vec3, b: Vec3): void;
|
|
32
34
|
/** A ball burst at `at`: a splash of light and a spray of sparks; a laser rifle's, `red`, bigger and fiercer. */
|
|
33
35
|
burst(at: Vec3, red?: boolean): void;
|
|
34
36
|
/** A grenade burst at `at`: a white-hot fireball in orange puffs that swells and shrinks away, a shower of embers, a strong light. `size` times as wide for a vehicle blowing up. */
|
|
@@ -32,6 +32,8 @@ export interface Combat {
|
|
|
32
32
|
step(a?: PlayerState, b?: PlayerState): void;
|
|
33
33
|
/** One frame at `now` (ms): the balls, the flashes and the sounds of what changed since the last one, and the HUD. */
|
|
34
34
|
frame(v: View | undefined, me: PlayerState | undefined, others: PlayerState[], keys: number, dt: number, now?: number): void;
|
|
35
|
+
/** Where the own shoulder cannon is locked on (a foe's chest), or undefined: its shots' beams go there. */
|
|
36
|
+
lock(at?: Vec3): void;
|
|
35
37
|
}
|
|
36
38
|
/** Shots between two states of a player, a u8 counter that wraps. */
|
|
37
39
|
export declare const fired: (a?: PlayerState, b?: PlayerState) => number;
|
|
@@ -58,7 +60,7 @@ export declare const dreadful: (was: {
|
|
|
58
60
|
life: number;
|
|
59
61
|
vy: number;
|
|
60
62
|
}, p: PlayerState) => boolean;
|
|
61
|
-
export declare const createCombat: (world: World, audio: Pick<Audio, "play"> & Partial<Pick<Audio, "loop">>, hud: Pick<Hud, "vitals" | "hit" | "down">, fx: Pick<Effects, "fire" | "cut" | "wound" | "lie" | "quake" | "blow" | "punch">, tracer: Pick<Tracer, "flash" | "burst" | "blast" | "orbs" | "update" | "mount" | "crackle" | "charging" | "lightning" | "tesla">, ctl: {
|
|
63
|
+
export declare const createCombat: (world: World, audio: Pick<Audio, "play"> & Partial<Pick<Audio, "loop">>, hud: Pick<Hud, "vitals" | "hit" | "down">, fx: Pick<Effects, "fire" | "cut" | "wound" | "lie" | "quake" | "blow" | "punch">, tracer: Pick<Tracer, "flash" | "burst" | "blast" | "orbs" | "update" | "mount" | "crackle" | "laser" | "charging" | "lightning" | "tesla">, ctl: {
|
|
62
64
|
pitch: number;
|
|
63
65
|
}, balls: Pick<Balls, "fire" | "frame">,
|
|
64
66
|
/** The muzzle of a runner's long gun as last drawn, from his feet (Renderer.muzzle()). */
|
|
@@ -16,7 +16,6 @@ export declare const SHOT: number[];
|
|
|
16
16
|
export declare const HEAD_PX = 112;
|
|
17
17
|
/** The haircuts of each body, in HAIRS_N's order: the man's by length (LENGTHS, soldier.ts), the woman's STYLE (hair.ts). */
|
|
18
18
|
export declare const HAIR_NAMES: string[][];
|
|
19
|
-
/** The classes, in ROLE's order (kit.ts): the name, what it is good at, what it pays for it, and where it plays. */
|
|
20
19
|
export declare const ROLES: [name: string, pros: string, cons: string, where: string][];
|
|
21
20
|
/** Capture the flag in a few lines, with the room's default rules. */
|
|
22
21
|
export declare const GOAL: string[];
|
|
@@ -80,10 +79,13 @@ export interface Hud {
|
|
|
80
79
|
marks(list: Mark[]): void;
|
|
81
80
|
/** The orbital station's mission line (mission.ts), `hot` when urgent; none hides it. */
|
|
82
81
|
mission(text?: string, hot?: boolean): void;
|
|
83
|
-
/**
|
|
84
|
-
|
|
82
|
+
/**
|
|
83
|
+
* The Hunter's current local vision mode, `text` empty for the plain view; with `hint`, the V key
|
|
84
|
+
* is shown with it, blinking in the plain view.
|
|
85
|
+
*/
|
|
86
|
+
hunterVision(text?: string, scoped?: boolean, hint?: boolean): void;
|
|
85
87
|
/** The Predator-style shoulder-laser sight, at a screen point and progressing to a lock. */
|
|
86
|
-
hunterAim(at?: [number, number], progress?: number): void;
|
|
88
|
+
hunterAim(at?: [number, number], progress?: number, now?: number): void;
|
|
87
89
|
/** The dark rim of a space helmet's visor around the screen: on while the own player wears one, off otherwise. */
|
|
88
90
|
visor(on: boolean): void;
|
|
89
91
|
/** The red vignette of a tackle, 0 (none) to 1 (full). */
|
|
@@ -39,6 +39,8 @@ export declare const hunterHarpoon: (lod: 0 | 1 | 2) => number[];
|
|
|
39
39
|
* draws it deployed, along the look; stowed it lies back along the top of the shoulder.
|
|
40
40
|
*/
|
|
41
41
|
export declare const CANNON_HINGE: Vec3;
|
|
42
|
+
/** The foot of the cannon's post, on its saddle on the left shoulder. */
|
|
43
|
+
export declare const CANNON_POST: Vec3;
|
|
42
44
|
/** Radians the stowed cannon is turned about its hinge's right axis from the deployed one: muzzle back. */
|
|
43
45
|
export declare const CANNON_FOLD = 2.9;
|
|
44
46
|
/** The cannon's muzzle, from its hinge, deployed (the stepped muzzle's face). */
|
|
@@ -27,12 +27,12 @@ export declare const WEAPON: {
|
|
|
27
27
|
export declare const slotted: (slot: number, hunter?: boolean) => number;
|
|
28
28
|
/** The choice after a key: 1 the gun, 2 the katana, 3 the rail gun, 4 the laser rifle (the Hunter's slots by slotted()), any other key keeps it. */
|
|
29
29
|
export declare const picked: (weapon: number, code: string, hunter?: boolean) => number;
|
|
30
|
-
/** Which of the gun, the katana, the rail gun
|
|
31
|
-
export declare const owned: (p?: PlayerState) => boolean[];
|
|
30
|
+
/** Which of the gun, the katana, the rail gun, the laser rifle and the fists a player has (the Hunter no fists); all of them when there is no state yet. */
|
|
31
|
+
export declare const owned: (p?: PlayerState, hunter?: boolean) => boolean[];
|
|
32
32
|
/**
|
|
33
33
|
* Follow the spawn's weapon and switch to newly picked-up special weapons unless fists are selected.
|
|
34
34
|
*/
|
|
35
|
-
export declare const chosen: (weapon: number, was?: PlayerState, now?: PlayerState) => number;
|
|
35
|
+
export declare const chosen: (weapon: number, was?: PlayerState, now?: PlayerState, hunter?: boolean) => number;
|
|
36
36
|
/** The keys of a step with KEY.BLADE set while the katana is the choice, KEY.RAIL while the rail gun is, KEY.RIFLE while the rifle is. */
|
|
37
37
|
export declare const withWeapon: (keys: number, weapon: number) => number;
|
|
38
38
|
/** The choice the wheel turns to, `dir` 1 or -1: the next weapon he has in slot order, including fists. */
|
|
@@ -166,6 +166,13 @@ export declare const SOUND: {
|
|
|
166
166
|
readonly HUNTER_LASER: 86;
|
|
167
167
|
/** The harpoon's next bolt racked in from behind: a servo's whine, the slide, the lock home. */
|
|
168
168
|
readonly HARPOON_RELOAD: 87;
|
|
169
|
+
/**
|
|
170
|
+
* The Hunter's views (the user, 2026-11-23): the flash of a view switched with V, then, while a
|
|
171
|
+
* special one is on, a heart beating and a radio that barely holds its station, both looped.
|
|
172
|
+
*/
|
|
173
|
+
readonly HUNTER_FLASH: 88;
|
|
174
|
+
readonly HEARTBEAT: 89;
|
|
175
|
+
readonly STATIC: 90;
|
|
169
176
|
};
|
|
170
177
|
/**
|
|
171
178
|
* The sounds of the game: one entry per sound, its voices layered, in SOUND order. A low-passed
|
|
@@ -213,6 +220,15 @@ export type Cry = {
|
|
|
213
220
|
};
|
|
214
221
|
/** Renders a Cry as mono samples at RATE, peaking at its `vol`. */
|
|
215
222
|
export declare const scream: (c?: Cry) => Float32Array;
|
|
223
|
+
/**
|
|
224
|
+
* A radio that barely holds its station, under the Hunter's special views (the user, 2026-11-23:
|
|
225
|
+
* close to the film's, subtle, and no high tone over and over but a deep, unsettling and slightly
|
|
226
|
+
* distorted one coming back slowly, then rarer and slower still): once a loop a low growl swells in
|
|
227
|
+
* and sinks away, overdriven,
|
|
228
|
+
* over a faint hiss that fades and drops out, a crackle now and then and a slow tuning whistle.
|
|
229
|
+
* 6.1 s, for a 6 s loop (seam): the swell's envelope repeats every 6 s, so the seam joins it.
|
|
230
|
+
*/
|
|
231
|
+
export declare const radio: () => Float32Array;
|
|
216
232
|
/**
|
|
217
233
|
* A sound made loopable: the last `x` samples are cross-faded into the first, the length drops by
|
|
218
234
|
* `x`, and the end joins the start. For a stationary sound (a loop's voice is held at full
|
|
@@ -382,8 +382,8 @@ export declare const DISK_COOL = 75;
|
|
|
382
382
|
export declare const HUNTER_LASER_LOCK: number;
|
|
383
383
|
/** Damage dealt by a locked Hunter shoulder laser. */
|
|
384
384
|
export declare const HUNTER_LASER_HP = 3;
|
|
385
|
-
/** Ticks between
|
|
386
|
-
export declare const HUNTER_LASER_COOL =
|
|
385
|
+
/** Ticks between two shots of the shoulder cannon held down; `cool` is 4 bits on the wire, so 15 at most. */
|
|
386
|
+
export declare const HUNTER_LASER_COOL = 15;
|
|
387
387
|
/** Plasma balls in flight in a room at most: past it the oldest bursts. They go on the wire. */
|
|
388
388
|
export declare const PLASMA_MAX = 64;
|
|
389
389
|
/** Ball.power of a vehicle's laser bolt (rover.ts): past CHARGE_MAX, so it names the bolt. It flies at BOLT_SPEED m/s. */
|
|
@@ -50,6 +50,14 @@ export type Strike = (typeof STRIKE)[keyof typeof STRIKE];
|
|
|
50
50
|
* `armed` is false while the match is over: no weapon, no rack. `bodies` are move()'s.
|
|
51
51
|
*/
|
|
52
52
|
export declare const step: (p: PlayerState, i: Input, w: World, team: number, armed?: boolean, bodies?: readonly Body[], kit?: Kit) => Strike;
|
|
53
|
+
/**
|
|
54
|
+
* The half width and height of the screen as the shoulder cannon's lock reads it, as the tangents
|
|
55
|
+
* of the look's half angles: a 70° view high on a 16:9 screen. Host and client share it, so the
|
|
56
|
+
* lock breaks on both when the target leaves it.
|
|
57
|
+
*/
|
|
58
|
+
export declare const SCREEN: readonly [number, number];
|
|
59
|
+
/** Whether `point` is on the screen of an eye at `eye` looking along `yaw` and `pitch` (SCREEN). */
|
|
60
|
+
export declare const onScreen: (eye: readonly number[], yaw: number, pitch: number, point: readonly number[]) => boolean;
|
|
53
61
|
/** A lock that is a saber lock, not a glory kill's execution: the blades cross. */
|
|
54
62
|
export declare const sabering: (p: Pick<PlayerState, "lock" | "exec">) => boolean;
|
|
55
63
|
/** The strength a charge of `ticks` gives, 1 to CHARGE_MAX: 1 under CHARGE_TAP, CHARGE_MAX at CHARGE_TICKS. */
|
|
@@ -21,8 +21,6 @@ export declare class Room {
|
|
|
21
21
|
private gone;
|
|
22
22
|
/** The plasma balls in flight, and the ones that burst since the last snapshot, which sends them once more. */
|
|
23
23
|
private balls;
|
|
24
|
-
/** Last tick a Hunter's shoulder laser hit, by player id. */
|
|
25
|
-
private hunterLasers;
|
|
26
24
|
/** Target and start tick of each Hunter's uninterrupted shoulder-laser lock. */
|
|
27
25
|
private hunterLocks;
|
|
28
26
|
/** The map's rovers, in the order of WorldDef.rovers, then its ships (ship.ts). */
|
|
@@ -196,7 +194,12 @@ export declare class Room {
|
|
|
196
194
|
private rail;
|
|
197
195
|
/** The shoulder laser's assisted target, kept inside a narrow forward cone and clear line of sight. */
|
|
198
196
|
private shoulderTarget;
|
|
199
|
-
/**
|
|
197
|
+
/** The enemy `id` as `p` saw him at `view`, while he is up, in range and on p's screen (onScreen()). */
|
|
198
|
+
private lockedOn;
|
|
199
|
+
/**
|
|
200
|
+
* A shot of the shoulder cannon (gun.ts paces them): at the foe locked on for HUNTER_LASER_LOCK,
|
|
201
|
+
* else straight down the look. The first enemy in its line takes HUNTER_LASER_HP.
|
|
202
|
+
*/
|
|
200
203
|
private shoulder;
|
|
201
204
|
/**
|
|
202
205
|
* The rail gun's ring of `p` at the view tick `view`: every enemy within RING_R of him as `p` drew
|
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.207.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|