@quake2ts/shared 0.0.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/browser/index.global.js +2 -0
- package/dist/browser/index.global.js.map +1 -0
- package/dist/cjs/index.cjs +6569 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/esm/index.js +6200 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/audio/constants.d.ts +24 -0
- package/dist/types/audio/constants.d.ts.map +1 -0
- package/dist/types/bsp/collision.d.ts +201 -0
- package/dist/types/bsp/collision.d.ts.map +1 -0
- package/dist/types/bsp/contents.d.ts +72 -0
- package/dist/types/bsp/contents.d.ts.map +1 -0
- package/dist/types/bsp/spatial.d.ts +13 -0
- package/dist/types/bsp/spatial.d.ts.map +1 -0
- package/dist/types/index.d.ts +38 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/inventory-helpers.d.ts +19 -0
- package/dist/types/inventory-helpers.d.ts.map +1 -0
- package/dist/types/io/binaryStream.d.ts +38 -0
- package/dist/types/io/binaryStream.d.ts.map +1 -0
- package/dist/types/io/binaryWriter.d.ts +26 -0
- package/dist/types/io/binaryWriter.d.ts.map +1 -0
- package/dist/types/io/index.d.ts +4 -0
- package/dist/types/io/index.d.ts.map +1 -0
- package/dist/types/io/messageBuilder.d.ts +21 -0
- package/dist/types/io/messageBuilder.d.ts.map +1 -0
- package/dist/types/items/ammo.d.ts +40 -0
- package/dist/types/items/ammo.d.ts.map +1 -0
- package/dist/types/items/index.d.ts +8 -0
- package/dist/types/items/index.d.ts.map +1 -0
- package/dist/types/items/powerups.d.ts +31 -0
- package/dist/types/items/powerups.d.ts.map +1 -0
- package/dist/types/items/weaponInfo.d.ts +5 -0
- package/dist/types/items/weaponInfo.d.ts.map +1 -0
- package/dist/types/items/weapons.d.ts +27 -0
- package/dist/types/items/weapons.d.ts.map +1 -0
- package/dist/types/math/angles.d.ts +19 -0
- package/dist/types/math/angles.d.ts.map +1 -0
- package/dist/types/math/anorms.d.ts +2 -0
- package/dist/types/math/anorms.d.ts.map +1 -0
- package/dist/types/math/color.d.ts +12 -0
- package/dist/types/math/color.d.ts.map +1 -0
- package/dist/types/math/mat4.d.ts +7 -0
- package/dist/types/math/mat4.d.ts.map +1 -0
- package/dist/types/math/random.d.ts +60 -0
- package/dist/types/math/random.d.ts.map +1 -0
- package/dist/types/math/vec3.d.ts +79 -0
- package/dist/types/math/vec3.d.ts.map +1 -0
- package/dist/types/net/driver.d.ts +10 -0
- package/dist/types/net/driver.d.ts.map +1 -0
- package/dist/types/net/index.d.ts +3 -0
- package/dist/types/net/index.d.ts.map +1 -0
- package/dist/types/net/netchan.d.ts +85 -0
- package/dist/types/net/netchan.d.ts.map +1 -0
- package/dist/types/pmove/apply.d.ts +5 -0
- package/dist/types/pmove/apply.d.ts.map +1 -0
- package/dist/types/pmove/categorize.d.ts +36 -0
- package/dist/types/pmove/categorize.d.ts.map +1 -0
- package/dist/types/pmove/config.d.ts +5 -0
- package/dist/types/pmove/config.d.ts.map +1 -0
- package/dist/types/pmove/constants.d.ts +76 -0
- package/dist/types/pmove/constants.d.ts.map +1 -0
- package/dist/types/pmove/currents.d.ts +58 -0
- package/dist/types/pmove/currents.d.ts.map +1 -0
- package/dist/types/pmove/dimensions.d.ts +14 -0
- package/dist/types/pmove/dimensions.d.ts.map +1 -0
- package/dist/types/pmove/duck.d.ts +39 -0
- package/dist/types/pmove/duck.d.ts.map +1 -0
- package/dist/types/pmove/fly.d.ts +34 -0
- package/dist/types/pmove/fly.d.ts.map +1 -0
- package/dist/types/pmove/index.d.ts +18 -0
- package/dist/types/pmove/index.d.ts.map +1 -0
- package/dist/types/pmove/jump.d.ts +28 -0
- package/dist/types/pmove/jump.d.ts.map +1 -0
- package/dist/types/pmove/move.d.ts +78 -0
- package/dist/types/pmove/move.d.ts.map +1 -0
- package/dist/types/pmove/pmove.d.ts +40 -0
- package/dist/types/pmove/pmove.d.ts.map +1 -0
- package/dist/types/pmove/slide.d.ts +63 -0
- package/dist/types/pmove/slide.d.ts.map +1 -0
- package/dist/types/pmove/snap.d.ts +40 -0
- package/dist/types/pmove/snap.d.ts.map +1 -0
- package/dist/types/pmove/special.d.ts +39 -0
- package/dist/types/pmove/special.d.ts.map +1 -0
- package/dist/types/pmove/stuck.d.ts +21 -0
- package/dist/types/pmove/stuck.d.ts.map +1 -0
- package/dist/types/pmove/types.d.ts +72 -0
- package/dist/types/pmove/types.d.ts.map +1 -0
- package/dist/types/pmove/view.d.ts +19 -0
- package/dist/types/pmove/view.d.ts.map +1 -0
- package/dist/types/pmove/water.d.ts +21 -0
- package/dist/types/pmove/water.d.ts.map +1 -0
- package/dist/types/protocol/bitpack.d.ts +17 -0
- package/dist/types/protocol/bitpack.d.ts.map +1 -0
- package/dist/types/protocol/configstrings.d.ts +73 -0
- package/dist/types/protocol/configstrings.d.ts.map +1 -0
- package/dist/types/protocol/constants.d.ts +36 -0
- package/dist/types/protocol/constants.d.ts.map +1 -0
- package/dist/types/protocol/contracts.d.ts +17 -0
- package/dist/types/protocol/contracts.d.ts.map +1 -0
- package/dist/types/protocol/crc.d.ts +5 -0
- package/dist/types/protocol/crc.d.ts.map +1 -0
- package/dist/types/protocol/cvar.d.ts +15 -0
- package/dist/types/protocol/cvar.d.ts.map +1 -0
- package/dist/types/protocol/effects.d.ts +33 -0
- package/dist/types/protocol/effects.d.ts.map +1 -0
- package/dist/types/protocol/entity.d.ts +46 -0
- package/dist/types/protocol/entity.d.ts.map +1 -0
- package/dist/types/protocol/entityEvent.d.ts +13 -0
- package/dist/types/protocol/entityEvent.d.ts.map +1 -0
- package/dist/types/protocol/entityState.d.ts +26 -0
- package/dist/types/protocol/entityState.d.ts.map +1 -0
- package/dist/types/protocol/index.d.ts +19 -0
- package/dist/types/protocol/index.d.ts.map +1 -0
- package/dist/types/protocol/layout.d.ts +9 -0
- package/dist/types/protocol/layout.d.ts.map +1 -0
- package/dist/types/protocol/ops.d.ts +44 -0
- package/dist/types/protocol/ops.d.ts.map +1 -0
- package/dist/types/protocol/player-state.d.ts +40 -0
- package/dist/types/protocol/player-state.d.ts.map +1 -0
- package/dist/types/protocol/player.d.ts +28 -0
- package/dist/types/protocol/player.d.ts.map +1 -0
- package/dist/types/protocol/renderFx.d.ts +23 -0
- package/dist/types/protocol/renderFx.d.ts.map +1 -0
- package/dist/types/protocol/stats.d.ts +61 -0
- package/dist/types/protocol/stats.d.ts.map +1 -0
- package/dist/types/protocol/tempEntity.d.ts +67 -0
- package/dist/types/protocol/tempEntity.d.ts.map +1 -0
- package/dist/types/protocol/usercmd.d.ts +33 -0
- package/dist/types/protocol/usercmd.d.ts.map +1 -0
- package/dist/types/protocol/writeUserCmd.d.ts +4 -0
- package/dist/types/protocol/writeUserCmd.d.ts.map +1 -0
- package/dist/types/replay/index.d.ts +3 -0
- package/dist/types/replay/index.d.ts.map +1 -0
- package/dist/types/replay/io.d.ts +7 -0
- package/dist/types/replay/io.d.ts.map +1 -0
- package/dist/types/replay/schema.d.ts +41 -0
- package/dist/types/replay/schema.d.ts.map +1 -0
- package/dist/types/testing.d.ts +6 -0
- package/dist/types/testing.d.ts.map +1 -0
- package/package.json +43 -0
- package/src/audio/constants.ts +35 -0
- package/src/bsp/collision.ts +1075 -0
- package/src/bsp/contents.ts +108 -0
- package/src/bsp/spatial.ts +116 -0
- package/src/index.ts +37 -0
- package/src/inventory-helpers.ts +81 -0
- package/src/io/binaryStream.ts +159 -0
- package/src/io/binaryWriter.ts +146 -0
- package/src/io/index.ts +3 -0
- package/src/io/messageBuilder.ts +117 -0
- package/src/items/ammo.ts +47 -0
- package/src/items/index.ts +8 -0
- package/src/items/powerups.ts +32 -0
- package/src/items/weaponInfo.ts +45 -0
- package/src/items/weapons.ts +28 -0
- package/src/math/angles.ts +135 -0
- package/src/math/anorms.ts +165 -0
- package/src/math/color.ts +42 -0
- package/src/math/mat4.ts +58 -0
- package/src/math/random.ts +182 -0
- package/src/math/vec3.ts +379 -0
- package/src/net/driver.ts +9 -0
- package/src/net/index.ts +2 -0
- package/src/net/netchan.ts +451 -0
- package/src/pmove/apply.ts +151 -0
- package/src/pmove/categorize.ts +162 -0
- package/src/pmove/config.ts +5 -0
- package/src/pmove/constants.ts +94 -0
- package/src/pmove/currents.ts +287 -0
- package/src/pmove/dimensions.ts +40 -0
- package/src/pmove/duck.ts +154 -0
- package/src/pmove/fly.ts +197 -0
- package/src/pmove/index.ts +18 -0
- package/src/pmove/jump.ts +92 -0
- package/src/pmove/move.ts +527 -0
- package/src/pmove/pmove.ts +446 -0
- package/src/pmove/slide.ts +267 -0
- package/src/pmove/snap.ts +89 -0
- package/src/pmove/special.ts +207 -0
- package/src/pmove/stuck.ts +258 -0
- package/src/pmove/types.ts +82 -0
- package/src/pmove/view.ts +57 -0
- package/src/pmove/water.ts +56 -0
- package/src/protocol/bitpack.ts +139 -0
- package/src/protocol/configstrings.ts +104 -0
- package/src/protocol/constants.ts +40 -0
- package/src/protocol/contracts.ts +149 -0
- package/src/protocol/crc.ts +32 -0
- package/src/protocol/cvar.ts +15 -0
- package/src/protocol/effects.ts +33 -0
- package/src/protocol/entity.ts +304 -0
- package/src/protocol/entityEvent.ts +14 -0
- package/src/protocol/entityState.ts +28 -0
- package/src/protocol/index.ts +19 -0
- package/src/protocol/layout.ts +9 -0
- package/src/protocol/ops.ts +49 -0
- package/src/protocol/player-state.ts +51 -0
- package/src/protocol/player.ts +165 -0
- package/src/protocol/renderFx.ts +22 -0
- package/src/protocol/stats.ts +161 -0
- package/src/protocol/tempEntity.ts +69 -0
- package/src/protocol/usercmd.ts +63 -0
- package/src/protocol/writeUserCmd.ts +30 -0
- package/src/replay/index.ts +2 -0
- package/src/replay/io.ts +37 -0
- package/src/replay/schema.ts +42 -0
- package/src/testing.ts +200 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { ContentsFlag } from '../bsp/contents.js';
|
|
2
|
+
import type { Vec3 } from '../math/vec3.js';
|
|
3
|
+
import type { PmFlags, PmType, WaterLevel, PlayerButton } from './constants.js';
|
|
4
|
+
export interface PmoveFrictionParams {
|
|
5
|
+
readonly velocity: Vec3;
|
|
6
|
+
readonly frametime: number;
|
|
7
|
+
readonly onGround: boolean;
|
|
8
|
+
readonly groundIsSlick: boolean;
|
|
9
|
+
readonly onLadder: boolean;
|
|
10
|
+
readonly waterlevel: number;
|
|
11
|
+
readonly pmFriction: number;
|
|
12
|
+
readonly pmStopSpeed: number;
|
|
13
|
+
readonly pmWaterFriction: number;
|
|
14
|
+
}
|
|
15
|
+
export interface PmoveAccelerateParams {
|
|
16
|
+
readonly velocity: Vec3;
|
|
17
|
+
readonly wishdir: Vec3;
|
|
18
|
+
readonly wishspeed: number;
|
|
19
|
+
readonly accel: number;
|
|
20
|
+
readonly frametime: number;
|
|
21
|
+
}
|
|
22
|
+
export interface PmoveCmd {
|
|
23
|
+
readonly forwardmove: number;
|
|
24
|
+
readonly sidemove: number;
|
|
25
|
+
readonly upmove: number;
|
|
26
|
+
readonly buttons: PlayerButton;
|
|
27
|
+
readonly impulse?: number;
|
|
28
|
+
readonly lightlevel?: number;
|
|
29
|
+
readonly angles: Vec3;
|
|
30
|
+
}
|
|
31
|
+
export interface PmoveWishResult {
|
|
32
|
+
readonly wishdir: Vec3;
|
|
33
|
+
readonly wishspeed: number;
|
|
34
|
+
}
|
|
35
|
+
export interface PmoveWishParams {
|
|
36
|
+
readonly forward: Vec3;
|
|
37
|
+
readonly right: Vec3;
|
|
38
|
+
readonly cmd: PmoveCmd;
|
|
39
|
+
readonly maxSpeed: number;
|
|
40
|
+
}
|
|
41
|
+
export interface PmoveTraceResult {
|
|
42
|
+
readonly fraction: number;
|
|
43
|
+
readonly endpos: Vec3;
|
|
44
|
+
readonly planeNormal?: Vec3;
|
|
45
|
+
readonly allsolid: boolean;
|
|
46
|
+
readonly startsolid: boolean;
|
|
47
|
+
readonly contents?: ContentsFlag;
|
|
48
|
+
readonly surfaceFlags?: number;
|
|
49
|
+
}
|
|
50
|
+
export type PmoveTraceFn = (start: Vec3, end: Vec3, mins?: Vec3, maxs?: Vec3) => PmoveTraceResult;
|
|
51
|
+
export type PmovePointContentsFn = (point: Vec3) => ContentsFlag;
|
|
52
|
+
export interface PmoveState {
|
|
53
|
+
pmType: PmType;
|
|
54
|
+
pmFlags: PmFlags;
|
|
55
|
+
origin: Vec3;
|
|
56
|
+
velocity: Vec3;
|
|
57
|
+
angles: Vec3;
|
|
58
|
+
viewAngles: Vec3;
|
|
59
|
+
viewHeight: number;
|
|
60
|
+
waterlevel: WaterLevel;
|
|
61
|
+
watertype: number;
|
|
62
|
+
cmd: PmoveCmd;
|
|
63
|
+
delta_angles: Vec3;
|
|
64
|
+
gravity: number;
|
|
65
|
+
mins: Vec3;
|
|
66
|
+
maxs: Vec3;
|
|
67
|
+
}
|
|
68
|
+
export interface PmoveImports {
|
|
69
|
+
trace: PmoveTraceFn;
|
|
70
|
+
pointcontents: PmovePointContentsFn;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/pmove/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEhF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAA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AAC,WAAW,CAAC,EAAE,IAAI,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,KAAK,gBAAgB,CAAC;AAElG,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK,YAAY,CAAC;AAGjE,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,IAAI,CAAC;IACb,QAAQ,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,IAAI,CAAC;IACb,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,QAAQ,CAAC;IACd,YAAY,EAAE,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,YAAY,CAAC;IACpB,aAAa,EAAE,oBAAoB,CAAC;CACrC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Vec3 } from '../math/vec3.js';
|
|
2
|
+
import { type AngleVectorsResult } from '../math/angles.js';
|
|
3
|
+
import { type PmFlags } from './constants.js';
|
|
4
|
+
export interface ClampViewAnglesParams {
|
|
5
|
+
readonly pmFlags: PmFlags;
|
|
6
|
+
readonly cmdAngles: Vec3;
|
|
7
|
+
readonly deltaAngles: Vec3;
|
|
8
|
+
}
|
|
9
|
+
export interface ClampViewAnglesResult extends AngleVectorsResult {
|
|
10
|
+
readonly viewangles: Vec3;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Pure translation of `PM_ClampAngles` from `rerelease/p_move.cpp`. The helper
|
|
14
|
+
* fuses the latest command angles with the stored delta, applies the teleport
|
|
15
|
+
* pitch/roll reset, enforces the ±90° pitch window, and returns the resulting
|
|
16
|
+
* axis vectors that the C version stored in `pml.forward/right/up`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function clampViewAngles(params: ClampViewAnglesParams): ClampViewAnglesResult;
|
|
19
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/pmove/view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;CAC3B;AAoBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,qBAAqB,CAkBpF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ContentsFlag } from '../bsp/contents.js';
|
|
2
|
+
import type { Vec3 } from '../math/vec3.js';
|
|
3
|
+
import { WaterLevel } from './constants.js';
|
|
4
|
+
import type { PmovePointContentsFn } from './types.js';
|
|
5
|
+
export interface WaterLevelParams {
|
|
6
|
+
readonly origin: Vec3;
|
|
7
|
+
readonly mins: Vec3;
|
|
8
|
+
readonly viewheight: number;
|
|
9
|
+
readonly pointContents: PmovePointContentsFn;
|
|
10
|
+
}
|
|
11
|
+
export interface WaterLevelResult {
|
|
12
|
+
readonly waterlevel: WaterLevel;
|
|
13
|
+
readonly watertype: ContentsFlag;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Mirrors the rerelease `PM_GetWaterLevel` helper: probes the player's feet,
|
|
17
|
+
* waist, and viewheight to determine how submerged they are and returns both
|
|
18
|
+
* the enum level plus the contents bits encountered at the lowest sample.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getWaterLevel(params: WaterLevelParams): WaterLevelResult;
|
|
21
|
+
//# sourceMappingURL=water.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"water.d.ts","sourceRoot":"","sources":["../../../src/pmove/water.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC;CAC9C;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAiCxE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Packs a value into the stats array using a specific bit width.
|
|
3
|
+
* Equivalent to C++ `set_compressed_integer`.
|
|
4
|
+
*
|
|
5
|
+
* @param stats The stats array (number[] representing int16s)
|
|
6
|
+
* @param startIndex The index in the stats array where the packed region begins (e.g. STAT_AMMO_INFO_START)
|
|
7
|
+
* @param id The ID of the item to set (0-based index within the packed region)
|
|
8
|
+
* @param count The value to set
|
|
9
|
+
* @param bitsPerValue Number of bits per item (e.g. 9 for ammo, 2 for powerups)
|
|
10
|
+
*/
|
|
11
|
+
export declare function setCompressedInteger(stats: number[], startIndex: number, id: number, count: number, bitsPerValue: number): void;
|
|
12
|
+
/**
|
|
13
|
+
* Unpacks a value from the stats array.
|
|
14
|
+
* Equivalent to C++ `get_compressed_integer`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getCompressedInteger(stats: number[], startIndex: number, id: number, bitsPerValue: number): number;
|
|
17
|
+
//# sourceMappingURL=bitpack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bitpack.d.ts","sourceRoot":"","sources":["../../../src/protocol/bitpack.ts"],"names":[],"mappings":"AAmFA;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,GACnB,IAAI,CAmBN;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,GACnB,MAAM,CASR"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare const MAX_STRING_CHARS = 1024;
|
|
2
|
+
export declare const MAX_STRING_TOKENS = 80;
|
|
3
|
+
export declare const MAX_TOKEN_CHARS = 512;
|
|
4
|
+
export declare const MAX_QPATH = 64;
|
|
5
|
+
export declare const MAX_OSPATH = 128;
|
|
6
|
+
export declare const MAX_CLIENTS = 256;
|
|
7
|
+
export declare const MAX_EDICTS = 8192;
|
|
8
|
+
export declare const MAX_LIGHTSTYLES = 256;
|
|
9
|
+
export declare const MAX_MODELS = 8192;
|
|
10
|
+
export declare const MAX_SOUNDS = 2048;
|
|
11
|
+
export declare const MAX_IMAGES = 512;
|
|
12
|
+
export declare const MAX_ITEMS = 256;
|
|
13
|
+
export declare const MAX_GENERAL: number;
|
|
14
|
+
export declare const MAX_SHADOW_LIGHTS = 256;
|
|
15
|
+
export declare const MAX_WHEEL_ITEMS = 32;
|
|
16
|
+
export declare const CS_MAX_STRING_LENGTH = 96;
|
|
17
|
+
export declare const CS_MAX_STRING_LENGTH_OLD = 64;
|
|
18
|
+
export declare enum ConfigStringIndex {
|
|
19
|
+
Name = 0,
|
|
20
|
+
CdTrack = 1,
|
|
21
|
+
Sky = 2,
|
|
22
|
+
SkyAxis = 3,
|
|
23
|
+
SkyRotate = 4,
|
|
24
|
+
StatusBar = 5,
|
|
25
|
+
HealthBarName = 55,
|
|
26
|
+
CONFIG_N64_PHYSICS = 56,
|
|
27
|
+
CONFIG_CTF_TEAMS = 57,
|
|
28
|
+
CONFIG_COOP_RESPAWN_STRING = 58,
|
|
29
|
+
Story = 54,// Arbitrarily placed in the gap for now
|
|
30
|
+
AirAccel = 59,
|
|
31
|
+
MaxClients = 60,
|
|
32
|
+
MapChecksum = 61,
|
|
33
|
+
Models = 62,
|
|
34
|
+
Sounds = 8254,
|
|
35
|
+
Images = 10302,
|
|
36
|
+
Lights = 10814,
|
|
37
|
+
ShadowLights = 11070,
|
|
38
|
+
Items = 11326,
|
|
39
|
+
Players = 11582,// CS_PLAYERS (contains userinfo with name, skin, etc.)
|
|
40
|
+
PlayerSkins = 11582,// Alias for legacy code compatibility
|
|
41
|
+
General = 11838,
|
|
42
|
+
WheelWeapons = 12350,
|
|
43
|
+
WheelAmmo = 12382,
|
|
44
|
+
WheelPowerups = 12414,
|
|
45
|
+
CdLoopCount = 12446,
|
|
46
|
+
GameStyle = 12447,
|
|
47
|
+
MaxConfigStrings = 12448
|
|
48
|
+
}
|
|
49
|
+
export declare const MAX_CONFIGSTRINGS = ConfigStringIndex.MaxConfigStrings;
|
|
50
|
+
/**
|
|
51
|
+
* Returns the maximum string length permitted for the given configstring index,
|
|
52
|
+
* mirroring the `CS_SIZE` helper in the rerelease. Statusbar and general ranges
|
|
53
|
+
* can legally occupy multiple 96-character slots; everything else is capped at
|
|
54
|
+
* `CS_MAX_STRING_LENGTH`.
|
|
55
|
+
*/
|
|
56
|
+
export declare function configStringSize(index: number): number;
|
|
57
|
+
export declare const CS_NAME = ConfigStringIndex.Name;
|
|
58
|
+
export declare const CS_CDTRACK = ConfigStringIndex.CdTrack;
|
|
59
|
+
export declare const CS_SKY = ConfigStringIndex.Sky;
|
|
60
|
+
export declare const CS_SKYAXIS = ConfigStringIndex.SkyAxis;
|
|
61
|
+
export declare const CS_SKYROTATE = ConfigStringIndex.SkyRotate;
|
|
62
|
+
export declare const CS_STATUSBAR = ConfigStringIndex.StatusBar;
|
|
63
|
+
export declare const CS_AIRACCEL = ConfigStringIndex.AirAccel;
|
|
64
|
+
export declare const CS_MAXCLIENTS = ConfigStringIndex.MaxClients;
|
|
65
|
+
export declare const CS_MAPCHECKSUM = ConfigStringIndex.MapChecksum;
|
|
66
|
+
export declare const CS_MODELS = ConfigStringIndex.Models;
|
|
67
|
+
export declare const CS_SOUNDS = ConfigStringIndex.Sounds;
|
|
68
|
+
export declare const CS_IMAGES = ConfigStringIndex.Images;
|
|
69
|
+
export declare const CS_LIGHTS = ConfigStringIndex.Lights;
|
|
70
|
+
export declare const CS_ITEMS = ConfigStringIndex.Items;
|
|
71
|
+
export declare const CS_PLAYERS = ConfigStringIndex.Players;
|
|
72
|
+
export declare const CS_GENERAL = ConfigStringIndex.General;
|
|
73
|
+
//# sourceMappingURL=configstrings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configstrings.d.ts","sourceRoot":"","sources":["../../../src/protocol/configstrings.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,eAAO,MAAM,SAAS,KAAK,CAAC;AAC5B,eAAO,MAAM,UAAU,MAAM,CAAC;AAE9B,eAAO,MAAM,WAAW,MAAM,CAAC;AAC/B,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B,eAAO,MAAM,UAAU,MAAM,CAAC;AAC9B,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,WAAW,QAAkB,CAAC;AAC3C,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAM3C,oBAAY,iBAAiB;IAC3B,IAAI,IAAI;IACR,OAAO,IAAI;IACX,GAAG,IAAI;IACP,OAAO,IAAI;IACX,SAAS,IAAI;IACb,SAAS,IAAI;IAGb,aAAa,KAAK;IAClB,kBAAkB,KAAK;IACvB,gBAAgB,KAAK;IACrB,0BAA0B,KAAK;IAC/B,KAAK,KAAK,CAAE,wCAAwC;IAEpD,QAAQ,KAAK;IACb,UAAU,KAAK;IACf,WAAW,KAAK;IAEhB,MAAM,KAAK;IACX,MAAM,OAAsB;IAC5B,MAAM,QAAsB;IAC5B,MAAM,QAAsB;IAC5B,YAAY,QAA2B;IACvC,KAAK,QAAmC;IACxC,OAAO,QAAoB,CAAE,uDAAuD;IACpF,WAAW,QAAU,CAAE,sCAAsC;IAC7D,OAAO,QAAwB;IAC/B,YAAY,QAAwB;IACpC,SAAS,QAAiC;IAC1C,aAAa,QAA8B;IAC3C,WAAW,QAAkC;IAC7C,SAAS,QAAkB;IAC3B,gBAAgB,QAAgB;CACjC;AAGD,eAAO,MAAM,iBAAiB,qCAAqC,CAAC;AAEpE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUtD;AAGD,eAAO,MAAM,OAAO,yBAAyB,CAAC;AAC9C,eAAO,MAAM,UAAU,4BAA4B,CAAC;AACpD,eAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,eAAO,MAAM,UAAU,4BAA4B,CAAC;AACpD,eAAO,MAAM,YAAY,8BAA8B,CAAC;AACxD,eAAO,MAAM,YAAY,8BAA8B,CAAC;AACxD,eAAO,MAAM,WAAW,6BAA6B,CAAC;AACtD,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAC1D,eAAO,MAAM,cAAc,gCAAgC,CAAC;AAC5D,eAAO,MAAM,SAAS,2BAA2B,CAAC;AAClD,eAAO,MAAM,SAAS,2BAA2B,CAAC;AAClD,eAAO,MAAM,SAAS,2BAA2B,CAAC;AAClD,eAAO,MAAM,SAAS,2BAA2B,CAAC;AAClD,eAAO,MAAM,QAAQ,0BAA0B,CAAC;AAChD,eAAO,MAAM,UAAU,4BAA4B,CAAC;AACpD,eAAO,MAAM,UAAU,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const MAX_CHALLENGES = 1024;
|
|
2
|
+
export declare const MAX_PACKET_ENTITIES = 256;
|
|
3
|
+
export declare const UPDATE_BACKUP = 16;
|
|
4
|
+
export declare const CMD_BACKUP = 64;
|
|
5
|
+
export declare const MAX_INFO_STRING = 512;
|
|
6
|
+
export declare const MAX_MSGLEN = 1400;
|
|
7
|
+
export declare const MZ_BLASTER = 0;
|
|
8
|
+
export declare const MZ_MACHINEGUN = 1;
|
|
9
|
+
export declare const MZ_SHOTGUN = 2;
|
|
10
|
+
export declare const MZ_CHAINGUN1 = 3;
|
|
11
|
+
export declare const MZ_CHAINGUN2 = 4;
|
|
12
|
+
export declare const MZ_CHAINGUN3 = 5;
|
|
13
|
+
export declare const MZ_RAILGUN = 6;
|
|
14
|
+
export declare const MZ_ROCKET = 7;
|
|
15
|
+
export declare const MZ_GRENADE = 8;
|
|
16
|
+
export declare const MZ_LOGIN = 9;
|
|
17
|
+
export declare const MZ_LOGOUT = 10;
|
|
18
|
+
export declare const MZ_SSHOTGUN = 11;
|
|
19
|
+
export declare const MZ_BFG = 12;
|
|
20
|
+
export declare const MZ_HYPERBLASTER = 13;
|
|
21
|
+
export declare const MZ_IONRIPPER = 16;
|
|
22
|
+
export declare const MZ_BLUEHYPERBLASTER = 17;
|
|
23
|
+
export declare const MZ_PHALANX = 18;
|
|
24
|
+
export declare const MZ_BFG2 = 19;
|
|
25
|
+
export declare const MZ_PHALANX2 = 20;
|
|
26
|
+
export declare const MZ_ETF_RIFLE = 30;
|
|
27
|
+
export declare const MZ_PROX = 31;
|
|
28
|
+
export declare const MZ_ETF_RIFLE_2 = 32;
|
|
29
|
+
export declare const MZ_HEATBEAM = 33;
|
|
30
|
+
export declare const MZ_BLASTER2 = 34;
|
|
31
|
+
export declare const MZ_TRACKER = 35;
|
|
32
|
+
export declare const MZ_NUKE1 = 36;
|
|
33
|
+
export declare const MZ_NUKE2 = 37;
|
|
34
|
+
export declare const MZ_NUKE4 = 38;
|
|
35
|
+
export declare const MZ_NUKE8 = 39;
|
|
36
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/protocol/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC,eAAO,MAAM,mBAAmB,MAAM,C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AAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ContractValidationResult {
|
|
2
|
+
missing: string[];
|
|
3
|
+
nonFunctions: string[];
|
|
4
|
+
extras: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface ContractValidationOptions {
|
|
7
|
+
readonly name?: string;
|
|
8
|
+
readonly allowExtra?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type ContractFunctionMap<Keys extends readonly string[]> = Record<Keys[number], (...args: unknown[]) => unknown>;
|
|
11
|
+
export declare function validateContract<Keys extends readonly string[]>(table: Record<string, unknown> | undefined, requiredKeys: Keys, options?: ContractValidationOptions): ContractValidationResult;
|
|
12
|
+
export declare function assertContract<Keys extends readonly string[]>(table: Record<string, unknown> | undefined, requiredKeys: Keys, options?: ContractValidationOptions): asserts table is ContractFunctionMap<Keys>;
|
|
13
|
+
export declare const GAME_IMPORT_KEYS: readonly ["Broadcast_Print", "Com_Print", "Client_Print", "Center_Print", "sound", "positioned_sound", "local_sound", "configstring", "get_configstring", "Com_Error", "modelindex", "soundindex", "imageindex", "setmodel", "trace", "clip", "pointcontents", "inPVS", "inPHS", "SetAreaPortalState", "AreasConnected", "linkentity", "unlinkentity", "BoxEdicts", "multicast", "unicast"];
|
|
14
|
+
export declare const GAME_EXPORT_KEYS: readonly ["PreInit", "Init", "Shutdown", "SpawnEntities", "WriteGameJson", "ReadGameJson", "WriteLevelJson", "ReadLevelJson", "CanSave", "ClientConnect", "ClientThink", "RunFrame", "Pmove"];
|
|
15
|
+
export declare const CGAME_IMPORT_KEYS: readonly ["Com_Print", "get_configstring", "Com_Error", "TagMalloc", "TagFree", "AddCommandString", "CL_FrameValid", "CL_FrameTime", "CL_ClientTime", "CL_ServerFrame", "Draw_RegisterPic", "Draw_GetPicSize", "SCR_DrawChar", "SCR_DrawPic", "SCR_DrawColorPic"];
|
|
16
|
+
export declare const CGAME_EXPORT_KEYS: readonly ["Init", "Shutdown", "DrawHUD", "TouchPics", "LayoutFlags", "GetActiveWeaponWheelWeapon", "GetOwnedWeaponWheelWeapons", "GetWeaponWheelAmmoCount", "GetPowerupWheelCount", "GetHitMarkerDamage", "Pmove", "ParseConfigString", "ParseCenterPrint", "ClearNotify", "ClearCenterprint", "NotifyMessage", "GetMonsterFlashOffset"];
|
|
17
|
+
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/protocol/contracts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,MAAM,mBAAmB,CAAC,IAAI,SAAS,SAAS,MAAM,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,CAAC;AAMxH,wBAAgB,gBAAgB,CAAC,IAAI,SAAS,SAAS,MAAM,EAAE,EAC7D,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC1C,YAAY,EAAE,IAAI,EAClB,OAAO,GAAE,yBAA8B,GACtC,wBAAwB,CAmB1B;AAED,wBAAgB,cAAc,CAAC,IAAI,SAAS,SAAS,MAAM,EAAE,EAC3D,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC1C,YAAY,EAAE,IAAI,EAClB,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,KAAK,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAmB5C;AAED,eAAO,MAAM,gBAAgB,6XA2BnB,CAAC;AAEX,eAAO,MAAM,gBAAgB,+LAcnB,CAAC;AAEX,eAAO,MAAM,iBAAiB,mQAgBpB,CAAC;AAEX,eAAO,MAAM,iBAAiB,0UAkBpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crc.d.ts","sourceRoot":"","sources":["../../../src/protocol/crc.ts"],"names":[],"mappings":"AAsBA;;GAEG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAM7C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const enum CvarFlags {
|
|
2
|
+
None = 0,
|
|
3
|
+
Archive = 1,
|
|
4
|
+
UserInfo = 2,
|
|
5
|
+
ServerInfo = 4,
|
|
6
|
+
Latch = 8,
|
|
7
|
+
Cheat = 16
|
|
8
|
+
}
|
|
9
|
+
export interface CvarDefinition {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly defaultValue: string;
|
|
12
|
+
readonly description?: string;
|
|
13
|
+
readonly flags?: CvarFlags;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=cvar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cvar.d.ts","sourceRoot":"","sources":["../../../src/protocol/cvar.ts"],"names":[],"mappings":"AAAA,0BAAkB,SAAS;IACzB,IAAI,IAAI;IACR,OAAO,IAAS;IAChB,QAAQ,IAAS;IACjB,UAAU,IAAS;IACnB,KAAK,IAAS;IACd,KAAK,KAAS;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;CAC5B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare enum EntityEffects {
|
|
2
|
+
Rotate = 4,
|
|
3
|
+
Gib = 8,
|
|
4
|
+
RotateScript = 16,
|
|
5
|
+
Blaster = 32,
|
|
6
|
+
Rocket = 64,
|
|
7
|
+
Grenade = 128,
|
|
8
|
+
HyperBlaster = 256,
|
|
9
|
+
Bfg = 512,
|
|
10
|
+
ColorShell = 1024,
|
|
11
|
+
Powerscreen = 2048,
|
|
12
|
+
Anim01 = 4096,
|
|
13
|
+
Anim23 = 8192,
|
|
14
|
+
AnimAll = 16384,
|
|
15
|
+
AnimAllFast = 32768,
|
|
16
|
+
Quad = 65536,
|
|
17
|
+
Pent = 131072,
|
|
18
|
+
Explosion = 262144,
|
|
19
|
+
Teleport = 524288,
|
|
20
|
+
Flag1 = 1048576,
|
|
21
|
+
Flag2 = 2097152,
|
|
22
|
+
Boomerang = 4194304,
|
|
23
|
+
Greengibs = 8388608,
|
|
24
|
+
Bluehyperblaster = 16777216,
|
|
25
|
+
Spinning = 33554432,
|
|
26
|
+
Plasma = 67108864,
|
|
27
|
+
Trap = 134217728,
|
|
28
|
+
Tracker = 268435456,
|
|
29
|
+
Double = 536870912,
|
|
30
|
+
Sphinx = 1073741824,
|
|
31
|
+
TagTrail = 2147483648
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=effects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../../../src/protocol/effects.ts"],"names":[],"mappings":"AACA,oBAAY,aAAa;IACvB,MAAM,IAAa;IACnB,GAAG,IAAa;IAChB,YAAY,KAAa;IACzB,OAAO,KAAa;IACpB,MAAM,KAAa;IACnB,OAAO,MAAa;IACpB,YAAY,MAAa;IACzB,GAAG,MAAa;IAChB,UAAU,OAAa;IACvB,WAAW,OAAa;IACxB,MAAM,OAAa;IACnB,MAAM,OAAa;IACnB,OAAO,QAAa;IACpB,WAAW,QAAa;IACxB,IAAI,QAAa;IACjB,IAAI,SAAa;IACjB,SAAS,SAAa;IACtB,QAAQ,SAAa;IACrB,KAAK,UAAa;IAClB,KAAK,UAAa;IAClB,SAAS,UAAa;IACtB,SAAS,UAAa;IACtB,gBAAgB,WAAa;IAC7B,QAAQ,WAAa;IACrB,MAAM,WAAa;IACnB,IAAI,YAAa;IACjB,OAAO,YAAa;IACpB,MAAM,YAAa;IACnB,MAAM,aAAa;IACnB,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BinaryWriter } from '../io/index.js';
|
|
2
|
+
import { EntityState } from './entityState.js';
|
|
3
|
+
export declare const U_ORIGIN1: number;
|
|
4
|
+
export declare const U_ORIGIN2: number;
|
|
5
|
+
export declare const U_ANGLE2: number;
|
|
6
|
+
export declare const U_ANGLE3: number;
|
|
7
|
+
export declare const U_FRAME8: number;
|
|
8
|
+
export declare const U_EVENT: number;
|
|
9
|
+
export declare const U_REMOVE: number;
|
|
10
|
+
export declare const U_MOREBITS1: number;
|
|
11
|
+
export declare const U_NUMBER16: number;
|
|
12
|
+
export declare const U_ORIGIN3: number;
|
|
13
|
+
export declare const U_ANGLE1: number;
|
|
14
|
+
export declare const U_MODEL: number;
|
|
15
|
+
export declare const U_RENDERFX8: number;
|
|
16
|
+
export declare const U_ALPHA: number;
|
|
17
|
+
export declare const U_EFFECTS8: number;
|
|
18
|
+
export declare const U_MOREBITS2: number;
|
|
19
|
+
export declare const U_SKIN8: number;
|
|
20
|
+
export declare const U_FRAME16: number;
|
|
21
|
+
export declare const U_RENDERFX16: number;
|
|
22
|
+
export declare const U_EFFECTS16: number;
|
|
23
|
+
export declare const U_MODEL2: number;
|
|
24
|
+
export declare const U_MODEL3: number;
|
|
25
|
+
export declare const U_MODEL4: number;
|
|
26
|
+
export declare const U_MOREBITS3: number;
|
|
27
|
+
export declare const U_OLDORIGIN: number;
|
|
28
|
+
export declare const U_SKIN16: number;
|
|
29
|
+
export declare const U_SOUND: number;
|
|
30
|
+
export declare const U_SOLID: number;
|
|
31
|
+
export declare const U_SCALE: number;
|
|
32
|
+
export declare const U_INSTANCE_BITS: number;
|
|
33
|
+
export declare const U_LOOP_VOLUME: number;
|
|
34
|
+
export declare const U_MOREBITS4: number;
|
|
35
|
+
export declare const U_LOOP_ATTENUATION_HIGH: number;
|
|
36
|
+
export declare const U_OWNER_HIGH: number;
|
|
37
|
+
export declare const U_OLD_FRAME_HIGH: number;
|
|
38
|
+
/**
|
|
39
|
+
* Writes the remove bit for an entity.
|
|
40
|
+
*/
|
|
41
|
+
export declare function writeRemoveEntity(number: number, writer: BinaryWriter): void;
|
|
42
|
+
/**
|
|
43
|
+
* Writes the delta between two entity states to a binary writer.
|
|
44
|
+
*/
|
|
45
|
+
export declare function writeDeltaEntity(from: EntityState, to: EntityState, writer: BinaryWriter, force: boolean, newEntity: boolean): void;
|
|
46
|
+
//# sourceMappingURL=entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/protocol/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,eAAO,MAAM,SAAS,QAAa,CAAC;AACpC,eAAO,MAAM,SAAS,QAAa,CAAC;AACpC,eAAO,MAAM,QAAQ,QAAc,CAAC;AACpC,eAAO,MAAM,QAAQ,QAAc,CAAC;AACpC,eAAO,MAAM,QAAQ,QAAc,CAAC;AACpC,eAAO,MAAM,OAAO,QAAe,CAAC;AACpC,eAAO,MAAM,QAAQ,QAAc,CAAC;AACpC,eAAO,MAAM,WAAW,QAAW,CAAC;AAEpC,eAAO,MAAM,UAAU,QAAY,CAAC;AACpC,eAAO,MAAM,SAAS,QAAa,CAAC;AACpC,eAAO,MAAM,QAAQ,QAAe,CAAC;AACrC,eAAO,MAAM,OAAO,QAAgB,CAAC;AACrC,eAAO,MAAM,WAAW,QAAY,CAAC;AACrC,eAAO,MAAM,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
Fall = 4,
|
|
7
|
+
FallFar = 5,
|
|
8
|
+
PlayerTeleport = 6,
|
|
9
|
+
OtherTeleport = 7,
|
|
10
|
+
OtherFootstep = 8,
|
|
11
|
+
LadderStep = 9
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=entityEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityEvent.d.ts","sourceRoot":"","sources":["../../../src/protocol/entityEvent.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,IAAI,IAAI;IACR,WAAW,IAAI;IACf,QAAQ,IAAI;IACZ,SAAS,IAAI;IACb,IAAI,IAAI;IACR,OAAO,IAAI;IACX,cAAc,IAAI;IAClB,aAAa,IAAI;IAGjB,aAAa,IAAI;IACjB,UAAU,IAAI;CACf"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Vec3 } from '../math/vec3.js';
|
|
2
|
+
export interface EntityState {
|
|
3
|
+
readonly number: number;
|
|
4
|
+
readonly origin: Vec3;
|
|
5
|
+
readonly angles: Vec3;
|
|
6
|
+
readonly oldOrigin?: Vec3;
|
|
7
|
+
readonly modelIndex: number;
|
|
8
|
+
readonly modelIndex2?: number;
|
|
9
|
+
readonly modelIndex3?: number;
|
|
10
|
+
readonly modelIndex4?: number;
|
|
11
|
+
readonly frame: number;
|
|
12
|
+
readonly skinNum: number;
|
|
13
|
+
readonly effects: number;
|
|
14
|
+
readonly renderfx: number;
|
|
15
|
+
readonly solid: number;
|
|
16
|
+
readonly sound?: number;
|
|
17
|
+
readonly event?: number;
|
|
18
|
+
readonly alpha?: number;
|
|
19
|
+
readonly scale?: number;
|
|
20
|
+
readonly instanceBits?: number;
|
|
21
|
+
readonly loopVolume?: number;
|
|
22
|
+
readonly loopAttenuation?: number;
|
|
23
|
+
readonly owner?: number;
|
|
24
|
+
readonly oldFrame?: number;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=entityState.d.ts.map
|
|
@@ -0,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@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './configstrings.js';
|
|
2
|
+
export * from './contracts.js';
|
|
3
|
+
export * from './cvar.js';
|
|
4
|
+
export * from './usercmd.js';
|
|
5
|
+
export * from './player-state.js';
|
|
6
|
+
export * from './ops.js';
|
|
7
|
+
export * from './tempEntity.js';
|
|
8
|
+
export * from './constants.js';
|
|
9
|
+
export * from './layout.js';
|
|
10
|
+
export * from './stats.js';
|
|
11
|
+
export * from './writeUserCmd.js';
|
|
12
|
+
export * from './renderFx.js';
|
|
13
|
+
export * from './crc.js';
|
|
14
|
+
export * from './effects.js';
|
|
15
|
+
export * from './entityEvent.js';
|
|
16
|
+
export * from './entity.js';
|
|
17
|
+
export * from './entityState.js';
|
|
18
|
+
export * from './player.js';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/protocol/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/protocol/layout.ts"],"names":[],"mappings":"AACA,oBAAY,WAAW;IACnB,cAAc,IAAI;IAClB,iBAAiB,IAAI;IACrB,gBAAgB,IAAI;IACpB,oBAAoB,IAAI;IACxB,YAAY,KAAK;IACjB,sBAAsB,KAAK;CAC9B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare enum ServerCommand {
|
|
2
|
+
bad = 0,
|
|
3
|
+
muzzleflash = 1,
|
|
4
|
+
muzzleflash2 = 2,
|
|
5
|
+
temp_entity = 3,
|
|
6
|
+
layout = 4,
|
|
7
|
+
inventory = 5,
|
|
8
|
+
nop = 6,
|
|
9
|
+
disconnect = 7,
|
|
10
|
+
reconnect = 8,
|
|
11
|
+
sound = 9,// <see code>
|
|
12
|
+
print = 10,// [byte] id [string] null terminated string
|
|
13
|
+
stufftext = 11,// [string] stuffed into client's console buffer, should be \n terminated
|
|
14
|
+
serverdata = 12,// [long] protocol ...
|
|
15
|
+
configstring = 13,// [short] [string]
|
|
16
|
+
spawnbaseline = 14,
|
|
17
|
+
centerprint = 15,// [string] to put in center of the screen
|
|
18
|
+
download = 16,// [short] size [size bytes]
|
|
19
|
+
playerinfo = 17,// variable
|
|
20
|
+
packetentities = 18,// [...]
|
|
21
|
+
deltapacketentities = 19,// [...]
|
|
22
|
+
frame = 20,
|
|
23
|
+
splitclient = 21,
|
|
24
|
+
configblast = 22,
|
|
25
|
+
spawnbaselineblast = 23,
|
|
26
|
+
level_restart = 24,
|
|
27
|
+
damage = 25,
|
|
28
|
+
locprint = 26,
|
|
29
|
+
fog = 27,
|
|
30
|
+
waitingforplayers = 28,
|
|
31
|
+
bot_chat = 29,
|
|
32
|
+
poi = 30,
|
|
33
|
+
help_path = 31,
|
|
34
|
+
muzzleflash3 = 32,
|
|
35
|
+
achievement = 33
|
|
36
|
+
}
|
|
37
|
+
export declare enum ClientCommand {
|
|
38
|
+
bad = 0,
|
|
39
|
+
nop = 1,
|
|
40
|
+
move = 2,// [[usercmd_t]
|
|
41
|
+
userinfo = 3,// [[userinfo string]
|
|
42
|
+
stringcmd = 4
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../../src/protocol/ops.ts"],"names":[],"mappings":"AACA,oBAAY,aAAa;IACvB,GAAG,IAAI;IAGP,WAAW,IAAI;IACf,YAAY,IAAI;IAChB,WAAW,IAAI;IACf,MAAM,IAAI;IACV,SAAS,IAAI;IAGb,GAAG,IAAI;IACP,UAAU,IAAI;IACd,SAAS,IAAI;IACb,KAAK,IAAI,CAAa,aAAa;IACnC,KAAK,KAAK,CAAY,4CAA4C;IAClE,SAAS,KAAK,CAAQ,yEAAyE;IAC/F,UAAU,KAAK,CAAO,sBAAsB;IAC5C,YAAY,KAAK,CAAK,mBAAmB;IACzC,aAAa,KAAK;IAClB,WAAW,KAAK,CAAM,0CAA0C;IAChE,QAAQ,KAAK,CAAS,4BAA4B;IAClD,UAAU,KAAK,CAAO,WAAW;IACjC,cAAc,KAAK,CAAG,QAAQ;IAC9B,mBAAmB,KAAK,CAAE,QAAQ;IAClC,KAAK,KAAK;IACV,WAAW,KAAK;IAChB,WAAW,KAAK;IAChB,kBAAkB,KAAK;IACvB,aAAa,KAAK;IAClB,MAAM,KAAK;IACX,QAAQ,KAAK;IACb,GAAG,KAAK;IACR,iBAAiB,KAAK;IACtB,QAAQ,KAAK;IACb,GAAG,KAAK;IACR,SAAS,KAAK;IACd,YAAY,KAAK;IACjB,WAAW,KAAK;CACjB;AAED,oBAAY,aAAa;IACvB,GAAG,IAAI;IACP,GAAG,IAAI;IACP,IAAI,IAAI,CAAc,eAAe;IACrC,QAAQ,IAAI,CAAU,qBAAqB;IAC3C,SAAS,IAAI;CACd"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Vec3 } from '../math/vec3.js';
|
|
2
|
+
import { WaterLevel } from '../pmove/constants.js';
|
|
3
|
+
export interface DamageIndicator {
|
|
4
|
+
direction: Vec3;
|
|
5
|
+
strength: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PlayerState {
|
|
8
|
+
origin: Vec3;
|
|
9
|
+
velocity: Vec3;
|
|
10
|
+
viewAngles: Vec3;
|
|
11
|
+
onGround: boolean;
|
|
12
|
+
waterLevel: WaterLevel;
|
|
13
|
+
watertype: number;
|
|
14
|
+
mins: Vec3;
|
|
15
|
+
maxs: Vec3;
|
|
16
|
+
damageAlpha: number;
|
|
17
|
+
damageIndicators: DamageIndicator[];
|
|
18
|
+
blend: [number, number, number, number];
|
|
19
|
+
pickupIcon?: string;
|
|
20
|
+
centerPrint?: string;
|
|
21
|
+
notify?: string;
|
|
22
|
+
stats: number[];
|
|
23
|
+
kick_angles: Vec3;
|
|
24
|
+
kick_origin: Vec3;
|
|
25
|
+
gunoffset: Vec3;
|
|
26
|
+
gunangles: Vec3;
|
|
27
|
+
gunindex: number;
|
|
28
|
+
pm_type: number;
|
|
29
|
+
pm_time: number;
|
|
30
|
+
pm_flags: number;
|
|
31
|
+
gun_frame: number;
|
|
32
|
+
rdflags: number;
|
|
33
|
+
fov: number;
|
|
34
|
+
renderfx: number;
|
|
35
|
+
gunskin?: number;
|
|
36
|
+
gunrate?: number;
|
|
37
|
+
damage_blend?: [number, number, number, number];
|
|
38
|
+
team_id?: number;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=player-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player-state.d.ts","sourceRoot":"","sources":["../../../src/protocol/player-state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,IAAI,CAAC;IACb,QAAQ,EAAE,IAAI,CAAC;IACf,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,KAAK,EAAE,MAAM,EAAE,CAAC;IAGhB,WAAW,EAAE,IAAI,CAAC;IAClB,WAAW,EAAE,IAAI,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IAGjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IAGjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BinaryWriter, Vec3 } from '../index.js';
|
|
2
|
+
export interface ProtocolPlayerState {
|
|
3
|
+
pm_type: number;
|
|
4
|
+
origin: Vec3;
|
|
5
|
+
velocity: Vec3;
|
|
6
|
+
pm_time: number;
|
|
7
|
+
pm_flags: number;
|
|
8
|
+
gravity: number;
|
|
9
|
+
delta_angles: Vec3;
|
|
10
|
+
viewoffset: Vec3;
|
|
11
|
+
viewangles: Vec3;
|
|
12
|
+
kick_angles: Vec3;
|
|
13
|
+
gun_index: number;
|
|
14
|
+
gun_frame: number;
|
|
15
|
+
gun_offset: Vec3;
|
|
16
|
+
gun_angles: Vec3;
|
|
17
|
+
blend: number[];
|
|
18
|
+
fov: number;
|
|
19
|
+
rdflags: number;
|
|
20
|
+
stats: number[];
|
|
21
|
+
watertype: number;
|
|
22
|
+
gunskin?: number;
|
|
23
|
+
gunrate?: number;
|
|
24
|
+
damage_blend?: number[];
|
|
25
|
+
team_id?: number;
|
|
26
|
+
}
|
|
27
|
+
export declare function writePlayerState(writer: BinaryWriter, ps: ProtocolPlayerState): void;
|
|
28
|
+
//# sourceMappingURL=player.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player.d.ts","sourceRoot":"","sources":["../../../src/protocol/player.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,IAAI,CAAC;IACb,QAAQ,EAAE,IAAI,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,IAAI,CAAC;IACnB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,WAAW,EAAE,IAAI,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAGlB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAoBD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,mBAAmB,GAAG,IAAI,CAoHpF"}
|