@korial29/tiny-fps 1.2.1 → 1.4.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/assets/{room-CU3Cb39R.js → room-DAxIdWVf.js} +267 -150
- package/dist/brick-D5SJVjYo.js +1 -0
- package/dist/index.js +12 -9
- package/dist/landfall-DB8gCv3d.js +21 -0
- package/dist/local.js +1 -1
- package/dist/paint-CV6qcA8q.js +4 -0
- package/dist/room.js +1 -1
- package/dist/server.js +1 -1
- package/dist/{stone-C1WSfvFC.js → stone-CnnB3DM5.js} +1 -1
- package/dist/{textures-DvdugEkd.js → textures-ry-qPiMg.js} +1 -1
- package/dist/{tranquility-fIuvSr_8.js → tranquility-DfbOPVxG.js} +1 -1
- package/dist/types/client/body.d.ts +1 -1
- package/dist/types/client/foley.d.ts +3 -1
- package/dist/types/client/gait.d.ts +6 -0
- package/dist/types/client/granite.d.ts +17 -0
- package/dist/types/client/render.d.ts +7 -4
- package/dist/types/client/sfx.d.ts +4 -0
- package/dist/types/client/targeting-physics.d.ts +1 -0
- package/dist/types/shared/beach.d.ts +25 -8
- package/dist/types/shared/constants.d.ts +7 -0
- package/dist/types/shared/relief.d.ts +5 -0
- package/dist/types/shared/routes.d.ts +1 -1
- package/dist/types/shared/types.d.ts +2 -0
- package/dist/types/shared/world.d.ts +2 -0
- package/package.json +1 -1
- package/dist/brick-DmjBCX9i.js +0 -1
- package/dist/landfall-COF_wyF5.js +0 -1
- package/dist/paint-DR2SC7ew.js +0 -4
|
@@ -4,6 +4,10 @@ var PLAYER_R = .4;
|
|
|
4
4
|
var PLAYER_H = 1.8;
|
|
5
5
|
/** Camera height above the feet. */
|
|
6
6
|
var EYE = 1.6;
|
|
7
|
+
var SWIM_DEPTH = 1.1;
|
|
8
|
+
var SWIM_EYE = 1.35;
|
|
9
|
+
/** A swimmer who steers with no key drifts up to the surface at this speed (m/s); with FORWARD or BACK he dives and climbs where he looks, at SWIM_SPEED. */
|
|
10
|
+
var SWIM_RISE = 1.5;
|
|
7
11
|
/** Pitch is clamped to ±MAX_PITCH radians, just short of straight up or down. */
|
|
8
12
|
var MAX_PITCH = 1.55;
|
|
9
13
|
/** A floor at most this much higher is walked onto; a higher one needs a jump. */
|
|
@@ -461,7 +465,7 @@ var made = /* @__PURE__ */ new WeakMap();
|
|
|
461
465
|
var raise = (def) => {
|
|
462
466
|
const old = made.get(def);
|
|
463
467
|
if (old) return old;
|
|
464
|
-
const { hole, bound, cell, at, pits = [] } = def;
|
|
468
|
+
const { hole, bound, cell, at, pits = [], origin: [ox, oz] = [0, 0] } = def;
|
|
465
469
|
const box = pits.reduce((b, q) => [
|
|
466
470
|
Math.min(b[0], q[0]),
|
|
467
471
|
Math.min(b[1], q[1]),
|
|
@@ -474,8 +478,8 @@ var raise = (def) => {
|
|
|
474
478
|
-Infinity
|
|
475
479
|
]);
|
|
476
480
|
const [cx, cz, a, b] = bound;
|
|
477
|
-
const x0 = Math.floor((cx - a) / cell) * cell;
|
|
478
|
-
const z0 = Math.floor((cz - b) / cell) * cell;
|
|
481
|
+
const x0 = Math.floor((cx - a - ox) / cell) * cell + ox;
|
|
482
|
+
const z0 = Math.floor((cz - b - oz) / cell) * cell + oz;
|
|
479
483
|
const nx = Math.ceil((cx + a - x0) / cell) + 1;
|
|
480
484
|
const nz = Math.ceil((cz + b - z0) / cell) + 1;
|
|
481
485
|
const h = new Float32Array(nx * nz);
|
|
@@ -707,7 +711,9 @@ var MODE = {
|
|
|
707
711
|
/** Seated in a rover (rover.ts): the body follows the seat, move() leaves it there. */
|
|
708
712
|
RIDE: 7,
|
|
709
713
|
/** The xenomorph on a wall (`wall` the side): it climbs, goes down and along it with no gravity. */
|
|
710
|
-
CLING: 8
|
|
714
|
+
CLING: 8,
|
|
715
|
+
/** Swimming (WorldDef.water): afloat on the surface, slow, unarmed. */
|
|
716
|
+
SWIM: 9
|
|
711
717
|
};
|
|
712
718
|
/**
|
|
713
719
|
* Which side of the player a wall or a ledge is on (PlayerState.wall). In the air it is the side
|
|
@@ -1138,7 +1144,7 @@ var onFloor = (m) => m === MODE.GROUND || m === MODE.SLIDE || m === MODE.CROUCH;
|
|
|
1138
1144
|
/** The height of the cylinder in this mode. */
|
|
1139
1145
|
var heightOf = (p) => p.mode === MODE.SLIDE || p.mode === MODE.CROUCH ? LOW_H : PLAYER_H;
|
|
1140
1146
|
/** The camera height above the feet in this mode. */
|
|
1141
|
-
var eyeHeight = (p) => p.mode === MODE.SLIDE || p.mode === MODE.CROUCH ? LOW_EYE : EYE;
|
|
1147
|
+
var eyeHeight = (p) => p.mode === MODE.SWIM ? SWIM_EYE : p.mode === MODE.SLIDE || p.mode === MODE.CROUCH ? LOW_EYE : EYE;
|
|
1142
1148
|
/** Horizontal speed, m/s. */
|
|
1143
1149
|
var speedOf$1 = (p) => len$1(p.vx, p.vz);
|
|
1144
1150
|
/** Whether the brush stops a body of height h whose feet are at y when it walks sideways into it. */
|
|
@@ -1849,6 +1855,47 @@ var free$1 = (p, w, c) => {
|
|
|
1849
1855
|
else startRun(p, w, c);
|
|
1850
1856
|
}
|
|
1851
1857
|
};
|
|
1858
|
+
/** The feet level of a swimmer: SWIM_DEPTH under the water. */
|
|
1859
|
+
var surface = (w) => (w.def.water ?? 0) - SWIM_DEPTH;
|
|
1860
|
+
/**
|
|
1861
|
+
* A body that sank (walked out along the bed, or fell in) more than the margin under the swimming
|
|
1862
|
+
* level starts to swim, put back on the level at once. The margin is above the one fly() takes
|
|
1863
|
+
* for a floor, so a swimmer over a bed that rises to the level lands and does not turn back.
|
|
1864
|
+
*/
|
|
1865
|
+
var wade = (p, w) => {
|
|
1866
|
+
if (w.def.water === void 0 || p.y >= surface(w) - 2 * SKIN || !(p.mode === MODE.GROUND || p.mode === MODE.AIR || p.mode === MODE.CROUCH || p.mode === MODE.SLIDE || p.mode === MODE.WALLRUN)) return;
|
|
1867
|
+
enter(p, MODE.SWIM);
|
|
1868
|
+
p.y = surface(w);
|
|
1869
|
+
p.vy = 0;
|
|
1870
|
+
p.dash = 0;
|
|
1871
|
+
p.wall = SIDE$1.NONE;
|
|
1872
|
+
};
|
|
1873
|
+
/**
|
|
1874
|
+
* Afloat: slowly toward the wished direction, no jump, no dash, no gravity. With FORWARD or BACK
|
|
1875
|
+
* he swims where he looks, down when he looks down (a dive) and back up when he looks up, never
|
|
1876
|
+
* over the surface; with neither he drifts up to it. On the bed he rests, and where the bed
|
|
1877
|
+
* rises to the surface he is put on his feet.
|
|
1878
|
+
*/
|
|
1879
|
+
var swim = (p, w, c) => {
|
|
1880
|
+
const k = Math.min(1, 6 * DT$2);
|
|
1881
|
+
const top = surface(w);
|
|
1882
|
+
const f = (c.keys & KEY.FORWARD ? 1 : 0) - (c.keys & KEY.BACK ? 1 : 0);
|
|
1883
|
+
const flat = f !== 0 && (p.pitch < 0 || p.y < top - SKIN) ? Math.cos(p.pitch) : 1;
|
|
1884
|
+
p.vx += (c.wx * 4 * flat - p.vx) * k;
|
|
1885
|
+
p.vz += (c.wz * 4 * flat - p.vz) * k;
|
|
1886
|
+
p.vy += ((f !== 0 ? f * Math.sin(p.pitch) * 4 : SWIM_RISE) - p.vy) * k;
|
|
1887
|
+
fly$1(p, w, heightOf(p), 0, false, c.bodies);
|
|
1888
|
+
if (span(p, w, heightOf(p), c.bodies)[0] >= top - SKIN) {
|
|
1889
|
+
p.y = Math.max(p.y, top);
|
|
1890
|
+
p.vy = 0;
|
|
1891
|
+
p.jumps = 1;
|
|
1892
|
+
p.dashes = c.kit.dashes;
|
|
1893
|
+
enter(p, MODE.GROUND);
|
|
1894
|
+
} else if (p.y > top) {
|
|
1895
|
+
p.y = top;
|
|
1896
|
+
p.vy = Math.min(p.vy, 0);
|
|
1897
|
+
}
|
|
1898
|
+
};
|
|
1852
1899
|
/** On the floor: jump, crouch, slide, stand up, and the speed. */
|
|
1853
1900
|
var onGround = (p, w, c, burst) => {
|
|
1854
1901
|
const low = (c.keys & KEY.CROUCH) !== 0;
|
|
@@ -1945,13 +1992,15 @@ var move = (p, i, w, team = 0, bodies = [], kit = KITS[0]) => {
|
|
|
1945
1992
|
}
|
|
1946
1993
|
if (p.mode === MODE.HANG) hang(p, w, c);
|
|
1947
1994
|
if (p.mode === MODE.CLING) cling(p, w, c);
|
|
1948
|
-
if (p.mode === MODE.
|
|
1995
|
+
if (p.mode === MODE.SWIM) swim(p, w, c);
|
|
1996
|
+
else if (p.mode === MODE.CLIMB) climb(p, w);
|
|
1949
1997
|
else if (p.mode !== MODE.HANG && p.mode !== MODE.CLING && !riding) free$1(p, w, c);
|
|
1998
|
+
wade(p, w);
|
|
1950
1999
|
if (p.slow) {
|
|
1951
2000
|
p.slow--;
|
|
1952
2001
|
cap(p, 3);
|
|
1953
2002
|
}
|
|
1954
|
-
if (p.y < w.def.floor) respawn(p, w, team, kit);
|
|
2003
|
+
if (p.y < w.def.floor && p.mode !== MODE.SWIM) respawn(p, w, team, kit);
|
|
1955
2004
|
p.t = p.mode === before ? Math.min(255, p.t + 1) : p.t;
|
|
1956
2005
|
p.buffer = Math.max(0, p.buffer - 1);
|
|
1957
2006
|
if (p.mode === MODE.AIR && before === MODE.AIR) p.coyote = Math.max(0, p.coyote - 1);
|
|
@@ -1976,7 +2025,7 @@ var CHEST = .7;
|
|
|
1976
2025
|
*/
|
|
1977
2026
|
var fends = (p, b) => {
|
|
1978
2027
|
if (!p.wield || p.swing || p.charge || p.stun > 0 || b.arc || b.power === 7) return false;
|
|
1979
|
-
if (p.mode === MODE.HANG || p.mode === MODE.CLIMB || p.mode === MODE.RIDE) return false;
|
|
2028
|
+
if (p.mode === MODE.HANG || p.mode === MODE.CLIMB || p.mode === MODE.RIDE || p.mode === MODE.SWIM) return false;
|
|
1980
2029
|
const [fx, fz] = forward(p.yaw);
|
|
1981
2030
|
const h = Math.sqrt(b.dx * b.dx + b.dz * b.dz);
|
|
1982
2031
|
return h > 1e-6 && -(b.dx * fx + b.dz * fz) >= Math.cos(1.2) * h;
|
|
@@ -5294,7 +5343,7 @@ var MOON = {
|
|
|
5294
5343
|
seam: ORBIT.SEAM,
|
|
5295
5344
|
station: STATION_DEF
|
|
5296
5345
|
};
|
|
5297
|
-
var MID$1 =
|
|
5346
|
+
var MID$1 = 125;
|
|
5298
5347
|
var [RED, BLUE] = TEAM_TINT;
|
|
5299
5348
|
var { METAL, STEEL, PAINT, WOOD, STONE, GRATE } = TEX;
|
|
5300
5349
|
var ORANGE = [
|
|
@@ -5310,15 +5359,16 @@ var YELLOW = [
|
|
|
5310
5359
|
/**
|
|
5311
5360
|
* The frame every piece is laid on, metres. Across x, from the sea to the forest: the water is too
|
|
5312
5361
|
* deep at `sea`, the waterline is at `shore` (the sand is at `water` there), the first trees stand
|
|
5313
|
-
* at `trees`, nothing is walked past `east`. Along z the
|
|
5314
|
-
* `cape` and after ZED - `cape
|
|
5362
|
+
* at `trees`, nothing is walked past `east`. Along z the sand runs on past each camp, among rocks,
|
|
5363
|
+
* to the headland's mass of rock, which closes the beach before z = `cape` and after ZED - `cape`:
|
|
5364
|
+
* past the ends of the 250 m, `cape` being negative.
|
|
5315
5365
|
*/
|
|
5316
5366
|
var FRAME = {
|
|
5317
5367
|
sea: 0,
|
|
5318
5368
|
shore: 30,
|
|
5319
5369
|
trees: 90,
|
|
5320
5370
|
east: 110,
|
|
5321
|
-
cape:
|
|
5371
|
+
cape: -6,
|
|
5322
5372
|
water: 0
|
|
5323
5373
|
};
|
|
5324
5374
|
/**
|
|
@@ -5327,10 +5377,10 @@ var FRAME = {
|
|
|
5327
5377
|
* at 1.4 m of water a standing runner still looks over it.
|
|
5328
5378
|
*/
|
|
5329
5379
|
var DEPTH = -1.4;
|
|
5330
|
-
/** Where nobody goes, x and z: the ghost wall behind the first palms and the one in each headland. */
|
|
5380
|
+
/** Where nobody goes, x and z: the ghost wall behind the first palms, and the one in each headland's mass, 4 m into it (z = cape and ZED - cape). */
|
|
5331
5381
|
var EDGE$1 = {
|
|
5332
5382
|
east: FRAME.trees + 5,
|
|
5333
|
-
cape: FRAME.cape
|
|
5383
|
+
cape: FRAME.cape - 4
|
|
5334
5384
|
};
|
|
5335
5385
|
/**
|
|
5336
5386
|
* The wreck, a hull along x on the centre line, broken in three: each section's x0 and x1. The
|
|
@@ -5689,121 +5739,186 @@ var WING$1 = {
|
|
|
5689
5739
|
*/
|
|
5690
5740
|
var ENGINES = [[
|
|
5691
5741
|
38.5,
|
|
5692
|
-
|
|
5742
|
+
150.3,
|
|
5693
5743
|
2.7,
|
|
5694
5744
|
19,
|
|
5695
5745
|
.78
|
|
5696
5746
|
], [
|
|
5697
5747
|
4.5,
|
|
5698
|
-
|
|
5748
|
+
137,
|
|
5699
5749
|
2.5,
|
|
5700
5750
|
9
|
|
5701
5751
|
]];
|
|
5702
5752
|
/** Red's camp: the escape pod its flag stands by (x, z, radius). */
|
|
5703
5753
|
var POD = [
|
|
5704
5754
|
60,
|
|
5705
|
-
|
|
5755
|
+
219,
|
|
5706
5756
|
4
|
|
5707
5757
|
];
|
|
5708
5758
|
/** The camp's ground, level. */
|
|
5709
5759
|
var CAMP = 1.25;
|
|
5710
5760
|
/**
|
|
5711
|
-
* Red's headland
|
|
5712
|
-
*
|
|
5713
|
-
*
|
|
5761
|
+
* Red's headland: each rock's x, z, radius, height and seed, a form of blockOf(). Blue's are their
|
|
5762
|
+
* twins. The map makes them solid and the scenery draws them, both from this list. Low and
|
|
5763
|
+
* scattered on the sand behind the camp, open sand between them, and along the waterline none: the
|
|
5764
|
+
* strand runs on past the headland's wall (EDGE.cape), which stands on open sand there, to rocks
|
|
5765
|
+
* in the sea that are only drawn. Bigger toward the trees, where the headland's mass begins.
|
|
5714
5766
|
*/
|
|
5715
5767
|
var ROCKS = [
|
|
5716
5768
|
[
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5769
|
+
38,
|
|
5770
|
+
237,
|
|
5771
|
+
3.5,
|
|
5772
|
+
2.6,
|
|
5721
5773
|
1
|
|
5722
5774
|
],
|
|
5723
5775
|
[
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5776
|
+
57,
|
|
5777
|
+
242,
|
|
5778
|
+
3,
|
|
5779
|
+
2.2,
|
|
5728
5780
|
2
|
|
5729
5781
|
],
|
|
5730
5782
|
[
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5783
|
+
47,
|
|
5784
|
+
251,
|
|
5785
|
+
4,
|
|
5786
|
+
3,
|
|
5735
5787
|
3
|
|
5736
5788
|
],
|
|
5737
5789
|
[
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5790
|
+
66,
|
|
5791
|
+
254,
|
|
5792
|
+
4.5,
|
|
5793
|
+
3.6,
|
|
5742
5794
|
4
|
|
5743
5795
|
],
|
|
5744
5796
|
[
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5797
|
+
78,
|
|
5798
|
+
241,
|
|
5799
|
+
4,
|
|
5800
|
+
3.4,
|
|
5749
5801
|
5
|
|
5750
5802
|
],
|
|
5751
5803
|
[
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
8,
|
|
5755
|
-
|
|
5804
|
+
33,
|
|
5805
|
+
256,
|
|
5806
|
+
2.8,
|
|
5807
|
+
1.8,
|
|
5756
5808
|
6
|
|
5757
5809
|
],
|
|
5758
5810
|
[
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5811
|
+
87,
|
|
5812
|
+
250,
|
|
5813
|
+
5.5,
|
|
5814
|
+
5,
|
|
5763
5815
|
7
|
|
5764
5816
|
],
|
|
5765
5817
|
[
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5818
|
+
97,
|
|
5819
|
+
243,
|
|
5820
|
+
6,
|
|
5821
|
+
6.5,
|
|
5770
5822
|
8
|
|
5771
5823
|
],
|
|
5772
5824
|
[
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
7,
|
|
5776
|
-
|
|
5825
|
+
100,
|
|
5826
|
+
256,
|
|
5827
|
+
7.5,
|
|
5828
|
+
9,
|
|
5777
5829
|
9
|
|
5778
5830
|
],
|
|
5779
5831
|
[
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
8,
|
|
5783
|
-
12,
|
|
5784
|
-
10
|
|
5785
|
-
],
|
|
5786
|
-
[
|
|
5787
|
-
105,
|
|
5788
|
-
194,
|
|
5832
|
+
89,
|
|
5833
|
+
262,
|
|
5789
5834
|
7,
|
|
5790
|
-
|
|
5791
|
-
|
|
5835
|
+
7,
|
|
5836
|
+
10
|
|
5792
5837
|
]
|
|
5793
5838
|
];
|
|
5794
5839
|
/**
|
|
5840
|
+
* The form of a block of granite of radius R and height H from a seed, as rockOf() in moon.ts: how
|
|
5841
|
+
* far it reaches from its middle (rockMid() over the ground) along a unit vector. A rounded box
|
|
5842
|
+
* (superellipsoids of the powers 4 and 8 blended: flat faces, rounded edges), turned and stretched by the seed, split
|
|
5843
|
+
* by two planes (a corner or a side sheared off, the edge softened), its faces dented by a low
|
|
5844
|
+
* noise. Under its middle it goes straight down, as wide as at its middle, to under the ground.
|
|
5845
|
+
* Only + - * /, Math.sqrt and the hash: the map's boxes come from it on every side.
|
|
5846
|
+
*/
|
|
5847
|
+
var blockOf = (s, R, H) => {
|
|
5848
|
+
const h = (k) => hash(s, k, 151);
|
|
5849
|
+
const t = 2 * h(1) - 1;
|
|
5850
|
+
const [cx, sx] = [(1 - t * t) / (1 + t * t), 2 * t / (1 + t * t)];
|
|
5851
|
+
const c = H - rockMid(H);
|
|
5852
|
+
const [a, b] = [R * (.85 + .3 * h(2)), R * (.6 + .3 * h(3))];
|
|
5853
|
+
const deep = rockMid(H) + .7 * H;
|
|
5854
|
+
/** The split planes: a unit normal and how far out of the middle along it, of what the box reaches there. */
|
|
5855
|
+
const cuts = [4, 8].map((k) => {
|
|
5856
|
+
const [nx, ny, nz] = [
|
|
5857
|
+
2 * h(k) - 1,
|
|
5858
|
+
.35 * h(k + 1),
|
|
5859
|
+
2 * h(k + 2) - 1
|
|
5860
|
+
];
|
|
5861
|
+
const l = Math.sqrt(nx * nx + ny * ny + nz * nz);
|
|
5862
|
+
return [
|
|
5863
|
+
nx / l,
|
|
5864
|
+
ny / l,
|
|
5865
|
+
nz / l,
|
|
5866
|
+
.7 + .2 * h(k + 3)
|
|
5867
|
+
];
|
|
5868
|
+
});
|
|
5869
|
+
const box = (u) => {
|
|
5870
|
+
const x = (u[0] * cx + u[2] * sx) / a;
|
|
5871
|
+
const z = (u[2] * cx - u[0] * sx) / b;
|
|
5872
|
+
const y = u[1] / c;
|
|
5873
|
+
const [x4, y4, z4] = [
|
|
5874
|
+
x * x * x * x,
|
|
5875
|
+
y * y * y * y,
|
|
5876
|
+
z * z * z * z
|
|
5877
|
+
];
|
|
5878
|
+
const p4 = Math.sqrt(Math.sqrt(x4 + y4 + z4));
|
|
5879
|
+
const p8 = Math.sqrt(Math.sqrt(Math.sqrt(x4 * x4 + y4 * y4 + z4 * z4)));
|
|
5880
|
+
return .25 / p4 + .75 / p8;
|
|
5881
|
+
};
|
|
5882
|
+
const reach = (u) => {
|
|
5883
|
+
if (u[1] < 0) {
|
|
5884
|
+
const l = Math.sqrt(u[0] * u[0] + u[2] * u[2]);
|
|
5885
|
+
return l < 1e-6 ? deep : Math.min(reach([
|
|
5886
|
+
u[0] / l,
|
|
5887
|
+
0,
|
|
5888
|
+
u[2] / l
|
|
5889
|
+
]) / l, deep / -u[1]);
|
|
5890
|
+
}
|
|
5891
|
+
let r = box(u);
|
|
5892
|
+
for (const [nx, ny, nz, k] of cuts) {
|
|
5893
|
+
const d = u[0] * nx + u[1] * ny + u[2] * nz;
|
|
5894
|
+
if (d > .001) {
|
|
5895
|
+
const p = k * box([
|
|
5896
|
+
nx,
|
|
5897
|
+
ny,
|
|
5898
|
+
nz
|
|
5899
|
+
]) / d;
|
|
5900
|
+
const w = Math.max(.2 - Math.abs(r - p), 0) / .2;
|
|
5901
|
+
r = Math.min(r, p) - .05 * w * w;
|
|
5902
|
+
}
|
|
5903
|
+
}
|
|
5904
|
+
return r * (.95 + .08 * noise(1.3 * u[0] + s, 1.3 * u[2] + 1.1 * u[1], s + 3));
|
|
5905
|
+
};
|
|
5906
|
+
return { reach };
|
|
5907
|
+
};
|
|
5908
|
+
/**
|
|
5795
5909
|
* Red's first row of palms, the trunks a runner can touch: each x, z and radius at the foot. The
|
|
5796
5910
|
* map makes them solid and the scenery draws a palm on each; the forest behind is drawn only.
|
|
5797
5911
|
* The first stands clear of the nose's flank.
|
|
5798
5912
|
*/
|
|
5799
|
-
var TRUNKS = Array.from({ length:
|
|
5913
|
+
var TRUNKS = Array.from({ length: 28 }, (_, i) => [
|
|
5800
5914
|
FRAME.trees + 3 * hash(i, 1, 7),
|
|
5801
|
-
|
|
5915
|
+
134 + 4 * i + 2 * hash(i, 2, 7),
|
|
5802
5916
|
.22 + .1 * hash(i, 3, 7)
|
|
5803
5917
|
]);
|
|
5804
5918
|
var c1 = (t) => Math.min(Math.max(t, 0), 1);
|
|
5805
5919
|
var sm = (t) => c1(t) * c1(t) * (3 - 2 * c1(t));
|
|
5806
5920
|
var far = (a, b) => Math.sqrt(a * a + b * b);
|
|
5921
|
+
MID$1 % 4;
|
|
5807
5922
|
/**
|
|
5808
5923
|
* Where the ground is level, x0, z0, x1, z1 (z in red's half) and the height: the way in to the
|
|
5809
5924
|
* hold's door through the bank, the sand under the tip of the wing, the camp. Level for 6 m round each, so that
|
|
@@ -5812,23 +5927,23 @@ var far = (a, b) => Math.sqrt(a * a + b * b);
|
|
|
5812
5927
|
var FLATS = [
|
|
5813
5928
|
[
|
|
5814
5929
|
57,
|
|
5815
|
-
|
|
5930
|
+
132,
|
|
5816
5931
|
61,
|
|
5817
|
-
|
|
5932
|
+
138,
|
|
5818
5933
|
HOLD.floor - .25
|
|
5819
5934
|
],
|
|
5820
5935
|
[
|
|
5821
5936
|
56,
|
|
5822
|
-
|
|
5937
|
+
171,
|
|
5823
5938
|
66,
|
|
5824
|
-
|
|
5939
|
+
175,
|
|
5825
5940
|
1.3
|
|
5826
5941
|
],
|
|
5827
5942
|
[
|
|
5828
5943
|
44,
|
|
5829
|
-
|
|
5944
|
+
209,
|
|
5830
5945
|
76,
|
|
5831
|
-
|
|
5946
|
+
229,
|
|
5832
5947
|
CAMP
|
|
5833
5948
|
]
|
|
5834
5949
|
];
|
|
@@ -5857,9 +5972,9 @@ var at$2 = (x, z) => {
|
|
|
5857
5972
|
};
|
|
5858
5973
|
/** The ground as it is walked on: at()'s lattice in float32, each square two triangles, as ground() in relief.ts reads it. */
|
|
5859
5974
|
var walked = (x, z) => {
|
|
5860
|
-
const [i, j] = [Math.floor(x / 4), Math.floor(z / 4)];
|
|
5861
|
-
const [fu, fv] = [x / 4 - i, z / 4 - j];
|
|
5862
|
-
const h = (u, v) => Math.fround(at$2(4 * (i + u), 4 * (j + v)));
|
|
5975
|
+
const [i, j] = [Math.floor(x / 4), Math.floor((z - 1) / 4)];
|
|
5976
|
+
const [fu, fv] = [x / 4 - i, (z - 1) / 4 - j];
|
|
5977
|
+
const h = (u, v) => Math.fround(at$2(4 * (i + u), 1 + 4 * (j + v)));
|
|
5863
5978
|
const [a, e] = [h(0, 0), h(1, 1)];
|
|
5864
5979
|
return fu >= fv ? a + (h(1, 0) - a) * fu + (e - h(1, 0)) * fv : a + (h(0, 1) - a) * fv + (e - h(0, 1)) * fu;
|
|
5865
5980
|
};
|
|
@@ -5887,19 +6002,19 @@ var flip$1 = (b) => ({
|
|
|
5887
6002
|
min: [
|
|
5888
6003
|
b.min[0],
|
|
5889
6004
|
b.min[1],
|
|
5890
|
-
|
|
6005
|
+
250 - b.max[2]
|
|
5891
6006
|
],
|
|
5892
6007
|
max: [
|
|
5893
6008
|
b.max[0],
|
|
5894
6009
|
b.max[1],
|
|
5895
|
-
|
|
6010
|
+
250 - b.min[2]
|
|
5896
6011
|
],
|
|
5897
6012
|
...b.tint ? { tint: b.tint === RED ? BLUE : b.tint } : {}
|
|
5898
6013
|
});
|
|
5899
6014
|
var flipPoint = ([x, y, z]) => [
|
|
5900
6015
|
x,
|
|
5901
6016
|
y,
|
|
5902
|
-
|
|
6017
|
+
250 - z
|
|
5903
6018
|
];
|
|
5904
6019
|
var both = (l, ...mid) => [
|
|
5905
6020
|
...l,
|
|
@@ -5995,38 +6110,38 @@ var hull$1 = () => SHIP$1.flatMap(({ cut, floor, holes, tears, fair, crates }, n
|
|
|
5995
6110
|
})];
|
|
5996
6111
|
}), ...crates.map(([x, deck]) => {
|
|
5997
6112
|
const y = c + (DECKS[deck] ?? floor);
|
|
5998
|
-
return note(line, "crate", box(x, y,
|
|
6113
|
+
return note(line, "crate", box(x, y, 124.25, x + 1.5, y + [
|
|
5999
6114
|
1,
|
|
6000
6115
|
1.4,
|
|
6001
6116
|
2
|
|
6002
|
-
][deck + 1],
|
|
6117
|
+
][deck + 1], 125.75, WOOD));
|
|
6003
6118
|
})];
|
|
6004
6119
|
});
|
|
6005
6120
|
var BACK$2 = HULL.axis.map((c) => c + HULL.r);
|
|
6006
6121
|
/** A heap of ribs in the middle of each gap, a pack on it, and a fallen frame leaning on each broken end. */
|
|
6007
6122
|
var GAPS = [40, 78].map((x) => {
|
|
6008
|
-
const [hi, lo] = under$1(x - 1.5,
|
|
6123
|
+
const [hi, lo] = under$1(x - 1.5, 123.5, x + 1.5, 126.5);
|
|
6009
6124
|
const top = Math.round((Math.max(hi, FRAME.water) + .4) * 32) / 32;
|
|
6010
6125
|
return {
|
|
6011
6126
|
x,
|
|
6012
6127
|
top,
|
|
6013
|
-
heap: box(x - 1.5, lo - .5,
|
|
6128
|
+
heap: box(x - 1.5, lo - .5, 123.5, x + 1.5, top, 126.5, STEEL, ORANGE)
|
|
6014
6129
|
};
|
|
6015
6130
|
});
|
|
6016
6131
|
/** A frame fallen against one broken end of each gap, on both sides of the line: the way through is between it and the heap, or round the heap's other side. */
|
|
6017
6132
|
var FRAMES = [36, 74].flatMap((x) => {
|
|
6018
|
-
const [hi, lo] = under$1(x,
|
|
6019
|
-
const b = box(x, lo - .5,
|
|
6133
|
+
const [hi, lo] = under$1(x, 128, x + 1.2, 130.5);
|
|
6134
|
+
const b = box(x, lo - .5, 128, x + 1.2, Math.round((hi + 1.4) * 32) / 32, 130.5, STEEL);
|
|
6020
6135
|
return [b, flip$1(b)];
|
|
6021
6136
|
});
|
|
6022
6137
|
/** The raft of the tail's skin afloat off its end, on the line: the middle of the way round. */
|
|
6023
|
-
var RAFT = box(.5, -.3,
|
|
6138
|
+
var RAFT = box(.5, -.3, 121, 5, .4, 129, METAL);
|
|
6024
6139
|
var centre = [
|
|
6025
6140
|
...hull$1(),
|
|
6026
6141
|
...GAPS.map((g) => note(line, "heap", g.heap)),
|
|
6027
6142
|
...FRAMES.map((b) => note(line, "frame", b)),
|
|
6028
6143
|
note(line, "raft", RAFT),
|
|
6029
|
-
ghost(box(EDGE$1.east, -10,
|
|
6144
|
+
ghost(box(EDGE$1.east, -10, EDGE$1.cape - 2, EDGE$1.east + 2, 40, 250 - EDGE$1.cape + 2, STONE))
|
|
6030
6145
|
];
|
|
6031
6146
|
/** How much a row of the wing stands over the next at most, metres. */
|
|
6032
6147
|
var RISE = .15;
|
|
@@ -6091,14 +6206,14 @@ var FIRES = [...[on(FALLEN[3]), [
|
|
|
6091
6206
|
], [
|
|
6092
6207
|
x,
|
|
6093
6208
|
y,
|
|
6094
|
-
|
|
6209
|
+
250 - z,
|
|
6095
6210
|
42,
|
|
6096
6211
|
1.3,
|
|
6097
6212
|
7
|
|
6098
6213
|
]]), ...HULL.sections.flatMap(([x0, x1], n) => [n && x0 - .6, n < 2 && x1 + .6].filter((x) => x).map((x) => [
|
|
6099
6214
|
+x,
|
|
6100
6215
|
HULL.axis[n] + 4.2,
|
|
6101
|
-
|
|
6216
|
+
125,
|
|
6102
6217
|
28,
|
|
6103
6218
|
.9,
|
|
6104
6219
|
4
|
|
@@ -6116,9 +6231,9 @@ var ENGINE = (() => {
|
|
|
6116
6231
|
* hands reach the deck from it and the hanging body clears it.
|
|
6117
6232
|
*/
|
|
6118
6233
|
var FLOATS$2 = [
|
|
6119
|
-
note(mine, "float", box(16, -1.6,
|
|
6120
|
-
note(mine, "float", box(10, -.2,
|
|
6121
|
-
note(mine, "float", box(23, -1.6,
|
|
6234
|
+
note(mine, "float", box(16, -1.6, 141, 22, .35, 144, METAL)),
|
|
6235
|
+
note(mine, "float", box(10, -.2, 138, 13, .5, 141, METAL)),
|
|
6236
|
+
note(mine, "float", box(23, -1.6, 132.6, 26, .2, 135, METAL))
|
|
6122
6237
|
];
|
|
6123
6238
|
/** The camp: the pod, the flag's step by it, a crate under each rack with a tarpaulin over it. */
|
|
6124
6239
|
var POD_BOX = note(mine, "pod", box(POD[0] - 3, .75, POD[1] - 3, POD[0] + 3, 4.25, POD[1] + 3, METAL));
|
|
@@ -6126,47 +6241,47 @@ var DAIS = note(mine, "dais", box(POD[0] - 2, .75, POD[1] - 10, POD[0] + 2, 1.3,
|
|
|
6126
6241
|
var crate = (x, z, h = .4, tint) => lay("crate", x - 1.5, z - 1.5, x + 1.5, z + 1.5, h, WOOD, tint);
|
|
6127
6242
|
/** A tarpaulin on four poles, wider than deep: no pole on a diagonal of the crate under it, where it would hide the rack from a spawn. */
|
|
6128
6243
|
var shelter = (x, z) => [box(x - 2.6, 3.85, z - 2.1, x + 2.6, 4, z + 2.1, PAINT, RED), ...[-1, 1].flatMap((a) => [-1, 1].map((b) => box(x + 2.5 * a - .1, .75, z + 2 * b - .1, x + 2.5 * a + .1, 3.85, z + 2 * b + .1, STEEL)))].map((b) => note(mine, "shelter", b));
|
|
6129
|
-
var [GUNS$1, BLADES] = [crate(49,
|
|
6130
|
-
var [RIFLES, RAILS] = [crate(84,
|
|
6244
|
+
var [GUNS$1, BLADES] = [crate(49, 221), crate(71, 221)];
|
|
6245
|
+
var [RIFLES, RAILS] = [crate(84, 185, .4, RED), crate(33, 153, .4, RED)];
|
|
6131
6246
|
/** The debris between the camp and the wing, a line to run: a panel, a container, the landing gear, a second container, the wing. */
|
|
6132
|
-
var PANEL = lay("panel", 67,
|
|
6133
|
-
var CONTAINER = lay("container", 68.5,
|
|
6134
|
-
var GEAR = lay("gear", 68.6,
|
|
6247
|
+
var PANEL = lay("panel", 67, 184.5, 70.5, 188, .65, METAL);
|
|
6248
|
+
var CONTAINER = lay("container", 68.5, 176, 71.1, 182, 1.875, METAL, ORANGE);
|
|
6249
|
+
var GEAR = lay("gear", 68.6, 170.6, 71, 173, 2.9, STEEL, YELLOW);
|
|
6135
6250
|
/** A second container, between the landing gear and the wing's second break. */
|
|
6136
|
-
var LAST = lay("container", 64,
|
|
6137
|
-
var BOGIE = lay("gear", 67.6,
|
|
6251
|
+
var LAST = lay("container", 64, 164.5, 67.5, 168, 2.6, METAL, ORANGE);
|
|
6252
|
+
var BOGIE = lay("gear", 67.6, 169.6, 72, 170.6, 1.2, STEEL);
|
|
6138
6253
|
/** What else lies about red's half, most with a pack on it. */
|
|
6139
6254
|
var SCRAP = {
|
|
6140
|
-
camp: [crate(76,
|
|
6255
|
+
camp: [crate(76, 213), crate(40, 217)],
|
|
6141
6256
|
west: [
|
|
6142
|
-
lay("panel", 44.5,
|
|
6143
|
-
lay("container", 33,
|
|
6144
|
-
lay("panel", 41,
|
|
6145
|
-
lay("panel", 25.5,
|
|
6146
|
-
lay("panel", 50.5,
|
|
6147
|
-
lay("container", 49.5,
|
|
6257
|
+
lay("panel", 44.5, 191.5, 47.5, 194.5, .5, METAL),
|
|
6258
|
+
lay("container", 33, 173.7, 39, 176.3, 2.2, METAL, ORANGE),
|
|
6259
|
+
lay("panel", 41, 163.5, 44, 166.5, .4, METAL),
|
|
6260
|
+
lay("panel", 25.5, 159.5, 28.5, 162.5, .5, METAL),
|
|
6261
|
+
lay("panel", 50.5, 139.5, 53.5, 142.5, .4, METAL),
|
|
6262
|
+
lay("container", 49.5, 132.4, 52.5, 135, 2.6, METAL, ORANGE)
|
|
6148
6263
|
],
|
|
6149
6264
|
east: [
|
|
6150
|
-
lay("panel", 62.5,
|
|
6151
|
-
crate(80,
|
|
6152
|
-
crate(85.5,
|
|
6153
|
-
crate(84,
|
|
6154
|
-
lay("panel", 84.5,
|
|
6265
|
+
lay("panel", 62.5, 145.5, 65.5, 148.5, .4, METAL),
|
|
6266
|
+
crate(80, 171),
|
|
6267
|
+
crate(85.5, 165),
|
|
6268
|
+
crate(84, 153),
|
|
6269
|
+
lay("panel", 84.5, 135.5, 87.5, 138.5, .4, METAL)
|
|
6155
6270
|
],
|
|
6156
6271
|
cover: [
|
|
6157
|
-
lay("panel", 78,
|
|
6158
|
-
lay("panel", 30,
|
|
6159
|
-
lay("container", 76,
|
|
6272
|
+
lay("panel", 78, 156.6, 83, 157, 2.6, METAL),
|
|
6273
|
+
lay("panel", 30, 166.6, 35, 167, 2.2, METAL),
|
|
6274
|
+
lay("container", 76, 190, 82, 192.6, 2.6, METAL, ORANGE)
|
|
6160
6275
|
]
|
|
6161
6276
|
};
|
|
6162
6277
|
/**
|
|
6163
|
-
* The boxes a headland rock collides with, inside what
|
|
6278
|
+
* The boxes a headland rock collides with, inside what blockOf() draws: layers `tall` high, each cut
|
|
6164
6279
|
* across x in strips `wide` wide that run from the rock's face toward the beach back to its far
|
|
6165
6280
|
* side or to `back`. Coarser than moon.ts fitted(), which would make 3000 boxes of red's eleven
|
|
6166
6281
|
* rocks: these stand at the end of the beach, behind the spawns.
|
|
6167
6282
|
*/
|
|
6168
6283
|
var massed = (x, z, R, H, s, back) => {
|
|
6169
|
-
const { reach } =
|
|
6284
|
+
const { reach } = blockOf(s, R, H);
|
|
6170
6285
|
const g = under$1(x - .8 * R, z - .8 * R, x + .8 * R, z + .8 * R);
|
|
6171
6286
|
const mid = walked(x, z) + rockMid(H);
|
|
6172
6287
|
const top = mid + reach([
|
|
@@ -6200,7 +6315,7 @@ var massed = (x, z, R, H, s, back) => {
|
|
|
6200
6315
|
return [edge(-1), edge(1)];
|
|
6201
6316
|
};
|
|
6202
6317
|
const out = [];
|
|
6203
|
-
const [wide, tall] = [2, 2];
|
|
6318
|
+
const [wide, tall] = [R < 5 ? 1 : R < 8 ? 2 : 3, H < 5 ? 1 : H < 12 ? 2 : 3];
|
|
6204
6319
|
for (let y0 = g[1] - .5; y0 < top - .3; y0 += tall) {
|
|
6205
6320
|
const y1 = Math.min(y0 + tall, top);
|
|
6206
6321
|
for (let x0 = -1.5 * R; x0 < 1.5 * R; x0 += wide) {
|
|
@@ -6235,7 +6350,7 @@ var CRAGS = ROCKS.map(([x, z, R, H, s]) => ({
|
|
|
6235
6350
|
R,
|
|
6236
6351
|
H,
|
|
6237
6352
|
s,
|
|
6238
|
-
parts: massed(x, z, R, H, s,
|
|
6353
|
+
parts: massed(x, z, R, H, s, 250 - EDGE$1.cape)
|
|
6239
6354
|
}));
|
|
6240
6355
|
var half = [
|
|
6241
6356
|
...wing(),
|
|
@@ -6246,8 +6361,8 @@ var half = [
|
|
|
6246
6361
|
DAIS,
|
|
6247
6362
|
GUNS$1,
|
|
6248
6363
|
BLADES,
|
|
6249
|
-
...shelter(49,
|
|
6250
|
-
...shelter(71,
|
|
6364
|
+
...shelter(49, 221),
|
|
6365
|
+
...shelter(71, 221),
|
|
6251
6366
|
RIFLES,
|
|
6252
6367
|
RAILS,
|
|
6253
6368
|
PANEL,
|
|
@@ -6261,7 +6376,7 @@ var half = [
|
|
|
6261
6376
|
return ghost(box(x - r, y - 1, z - r, x + r, y + 9, z + r, WOOD));
|
|
6262
6377
|
}),
|
|
6263
6378
|
...CRAGS.flatMap((c) => c.parts).map(([x0, y0, z0, x1, y1, z1]) => ghost(box(x0, y0, z0, x1, y1, z1, STONE))),
|
|
6264
|
-
ghost(box(-60, -10,
|
|
6379
|
+
ghost(box(-60, -10, 250 - EDGE$1.cape, EDGE$1.east + 2, 40, 250 - EDGE$1.cape + 2, STONE))
|
|
6265
6380
|
];
|
|
6266
6381
|
HULL.sections.map(([x0, x1], n) => [
|
|
6267
6382
|
x0,
|
|
@@ -6275,12 +6390,12 @@ HULL.sections.map(([x0, x1], n) => [
|
|
|
6275
6390
|
min: [
|
|
6276
6391
|
min[0],
|
|
6277
6392
|
min[1],
|
|
6278
|
-
|
|
6393
|
+
250 - max[2]
|
|
6279
6394
|
],
|
|
6280
6395
|
max: [
|
|
6281
6396
|
max[0],
|
|
6282
6397
|
max[1],
|
|
6283
|
-
|
|
6398
|
+
250 - min[2]
|
|
6284
6399
|
]
|
|
6285
6400
|
}))
|
|
6286
6401
|
], [...CRAGS, ...CRAGS.map((c) => ({
|
|
@@ -6288,15 +6403,15 @@ HULL.sections.map(([x0, x1], n) => [
|
|
|
6288
6403
|
at: [
|
|
6289
6404
|
c.at[0],
|
|
6290
6405
|
c.at[1],
|
|
6291
|
-
|
|
6406
|
+
250 - c.at[2]
|
|
6292
6407
|
],
|
|
6293
6408
|
parts: c.parts.map(([x0, y0, z0, x1, y1, z1]) => [
|
|
6294
6409
|
x0,
|
|
6295
6410
|
y0,
|
|
6296
|
-
|
|
6411
|
+
250 - z1,
|
|
6297
6412
|
x1,
|
|
6298
6413
|
y1,
|
|
6299
|
-
|
|
6414
|
+
250 - z0
|
|
6300
6415
|
])
|
|
6301
6416
|
}))];
|
|
6302
6417
|
/** Eight, behind the pod, facing the other camp. */
|
|
@@ -6308,12 +6423,12 @@ var SPAWNS = [
|
|
|
6308
6423
|
].flatMap((x) => [[
|
|
6309
6424
|
x,
|
|
6310
6425
|
CAMP,
|
|
6311
|
-
|
|
6426
|
+
226,
|
|
6312
6427
|
0
|
|
6313
6428
|
], [
|
|
6314
6429
|
x + 4,
|
|
6315
6430
|
CAMP,
|
|
6316
|
-
|
|
6431
|
+
229,
|
|
6317
6432
|
0
|
|
6318
6433
|
]]);
|
|
6319
6434
|
var team = (red) => {
|
|
@@ -6323,7 +6438,7 @@ var team = (red) => {
|
|
|
6323
6438
|
spawns: red ? SPAWNS : SPAWNS.map(([x, y, z]) => [
|
|
6324
6439
|
x,
|
|
6325
6440
|
y,
|
|
6326
|
-
|
|
6441
|
+
250 - z,
|
|
6327
6442
|
Math.PI
|
|
6328
6443
|
]),
|
|
6329
6444
|
rack: side(on(GUNS$1)),
|
|
@@ -6336,7 +6451,7 @@ var team = (red) => {
|
|
|
6336
6451
|
var GALLERY = [
|
|
6337
6452
|
70.5,
|
|
6338
6453
|
HULL.axis[1] + DECKS[1],
|
|
6339
|
-
|
|
6454
|
+
128
|
|
6340
6455
|
];
|
|
6341
6456
|
var BEACH = {
|
|
6342
6457
|
armor: true,
|
|
@@ -6396,6 +6511,7 @@ var BEACH = {
|
|
|
6396
6511
|
MID$1
|
|
6397
6512
|
]),
|
|
6398
6513
|
floor: DEPTH,
|
|
6514
|
+
water: FRAME.water,
|
|
6399
6515
|
fires: FIRES.map(([x, y, z, , r]) => [
|
|
6400
6516
|
x,
|
|
6401
6517
|
y,
|
|
@@ -6414,9 +6530,10 @@ var BEACH = {
|
|
|
6414
6530
|
56,
|
|
6415
6531
|
MID$1,
|
|
6416
6532
|
100,
|
|
6417
|
-
|
|
6533
|
+
185
|
|
6418
6534
|
],
|
|
6419
6535
|
cell: 4,
|
|
6536
|
+
origin: [0, 1],
|
|
6420
6537
|
at: at$2
|
|
6421
6538
|
},
|
|
6422
6539
|
sun: {
|
|
@@ -6655,24 +6772,24 @@ var UP = {
|
|
|
6655
6772
|
* by beach.test.ts): from `start` in red's shallows, walked west so the first jump is come at
|
|
6656
6773
|
* along its line, onto the float aground there, to the second float, up onto the engine and down
|
|
6657
6774
|
* to the raft on the centre line (`out`); and from the raft back by the same boxes to red's
|
|
6658
|
-
* shallows (`in`). Blue's are their mirror across z =
|
|
6775
|
+
* shallows (`in`). Blue's are their mirror across z = 125, so a way round is `out` then the
|
|
6659
6776
|
* mirror of `in`.
|
|
6660
6777
|
*/
|
|
6661
6778
|
var LAGOON = {
|
|
6662
|
-
start: [26,
|
|
6779
|
+
start: [26, 143],
|
|
6663
6780
|
out: [
|
|
6664
|
-
leap([23,
|
|
6665
|
-
leap([16.4,
|
|
6666
|
-
leap([10.3,
|
|
6667
|
-
go(4,
|
|
6668
|
-
leap([3.5,
|
|
6781
|
+
leap([23, 142.5], [20, 142.5], .35, { sprint: false }),
|
|
6782
|
+
leap([16.4, 142.2], [12, 139.8], .5, { sprint: false }),
|
|
6783
|
+
leap([10.3, 139], [6, 137.5], 1.4, { sprint: false }),
|
|
6784
|
+
go(4, 133.8, 1.4, false),
|
|
6785
|
+
leap([3.5, 132.7], [3, 127], .4, { sprint: false })
|
|
6669
6786
|
],
|
|
6670
6787
|
in: [
|
|
6671
|
-
go(3,
|
|
6672
|
-
leap([3,
|
|
6673
|
-
leap([6.5,
|
|
6674
|
-
leap([12.6,
|
|
6675
|
-
go(21,
|
|
6788
|
+
go(3, 122, .4),
|
|
6789
|
+
leap([3, 128.5], [3.5, 133.5], 1.4, { sprint: false }),
|
|
6790
|
+
leap([6.5, 137.5], [11, 139.5], .5, { sprint: false }),
|
|
6791
|
+
leap([12.6, 140], [17, 142.3], .35, { sprint: false }),
|
|
6792
|
+
go(21, 142.5, .35, false)
|
|
6676
6793
|
]
|
|
6677
6794
|
};
|
|
6678
6795
|
// src/shared/nav.ts
|
|
@@ -7224,20 +7341,20 @@ var build = (w) => {
|
|
|
7224
7341
|
const [[tail], [west, east]] = HULL.sections;
|
|
7225
7342
|
nav.ways = 5;
|
|
7226
7343
|
polys.forEach(({ q, y, r }, i) => {
|
|
7227
|
-
if (q[1] <=
|
|
7344
|
+
if (q[1] <= 125 && q[3] >= 125) {
|
|
7228
7345
|
const x = (q[0] + q[2]) / 2;
|
|
7229
7346
|
route[i] = !r && y > HIGH_ROAD ? 0 : x < tail ? 4 : x < west ? 2 : x < east ? 1 : 3;
|
|
7230
7347
|
}
|
|
7231
7348
|
});
|
|
7232
7349
|
const [x, z] = LAGOON.start;
|
|
7233
7350
|
for (const blue of [false, true]) {
|
|
7234
|
-
const legs = [...LAGOON.out, ...LAGOON.in.map((l) => mirror(l,
|
|
7235
|
-
const sz = blue ?
|
|
7351
|
+
const legs = [...LAGOON.out, ...LAGOON.in.map((l) => mirror(l, 250))];
|
|
7352
|
+
const sz = blue ? 250 - z : z;
|
|
7236
7353
|
links(nav, w, [
|
|
7237
7354
|
x,
|
|
7238
7355
|
ground(w, x, sz),
|
|
7239
7356
|
sz
|
|
7240
|
-
], blue ? legs.map((l) => mirror(l,
|
|
7357
|
+
], blue ? legs.map((l) => mirror(l, 250)) : legs, 4, true);
|
|
7241
7358
|
}
|
|
7242
7359
|
}
|
|
7243
7360
|
return nav;
|
|
@@ -8447,7 +8564,7 @@ var step = (p, i, w, team, armed = true, bodies = [], kit = KITS[0]) => {
|
|
|
8447
8564
|
];
|
|
8448
8565
|
p.cool = Math.max(0, p.cool - 1);
|
|
8449
8566
|
p.lob = Math.max(0, (p.lob ?? 0) - 1);
|
|
8450
|
-
const busy = p.mode === MODE.HANG || p.mode === MODE.CLIMB;
|
|
8567
|
+
const busy = p.mode === MODE.HANG || p.mode === MODE.CLIMB || p.mode === MODE.SWIM;
|
|
8451
8568
|
const table = kit.xeno ? TAILS : CUTS;
|
|
8452
8569
|
const { ticks, hold } = table[p.cut ?? 0];
|
|
8453
8570
|
const top = !!p.swing && !p.heavy && ticks - p.swing === hold;
|