quake2ts 0.0.7

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.
Files changed (149) hide show
  1. package/apps/viewer/dist/browser/index.global.js +2 -0
  2. package/apps/viewer/dist/browser/index.global.js.map +1 -0
  3. package/apps/viewer/dist/cjs/index.cjs +1087 -0
  4. package/apps/viewer/dist/cjs/index.cjs.map +1 -0
  5. package/apps/viewer/dist/esm/index.js +1060 -0
  6. package/apps/viewer/dist/esm/index.js.map +1 -0
  7. package/apps/viewer/dist/tsconfig.tsbuildinfo +1 -0
  8. package/apps/viewer/dist/types/index.d.ts +7 -0
  9. package/apps/viewer/dist/types/index.d.ts.map +1 -0
  10. package/package.json +107 -0
  11. package/packages/client/dist/browser/index.global.js +2 -0
  12. package/packages/client/dist/browser/index.global.js.map +1 -0
  13. package/packages/client/dist/cjs/index.cjs +57 -0
  14. package/packages/client/dist/cjs/index.cjs.map +1 -0
  15. package/packages/client/dist/esm/index.js +32 -0
  16. package/packages/client/dist/esm/index.js.map +1 -0
  17. package/packages/client/dist/tsconfig.tsbuildinfo +1 -0
  18. package/packages/client/dist/types/index.d.ts +14 -0
  19. package/packages/client/dist/types/index.d.ts.map +1 -0
  20. package/packages/engine/dist/browser/index.global.js +2 -0
  21. package/packages/engine/dist/browser/index.global.js.map +1 -0
  22. package/packages/engine/dist/cjs/index.cjs +1823 -0
  23. package/packages/engine/dist/cjs/index.cjs.map +1 -0
  24. package/packages/engine/dist/esm/index.js +1764 -0
  25. package/packages/engine/dist/esm/index.js.map +1 -0
  26. package/packages/engine/dist/tsconfig.tsbuildinfo +1 -0
  27. package/packages/engine/dist/types/assets/browserIngestion.d.ts +7 -0
  28. package/packages/engine/dist/types/assets/browserIngestion.d.ts.map +1 -0
  29. package/packages/engine/dist/types/assets/bsp.d.ts +157 -0
  30. package/packages/engine/dist/types/assets/bsp.d.ts.map +1 -0
  31. package/packages/engine/dist/types/assets/cache.d.ts +17 -0
  32. package/packages/engine/dist/types/assets/cache.d.ts.map +1 -0
  33. package/packages/engine/dist/types/assets/ingestion.d.ts +31 -0
  34. package/packages/engine/dist/types/assets/ingestion.d.ts.map +1 -0
  35. package/packages/engine/dist/types/assets/md2.d.ts +73 -0
  36. package/packages/engine/dist/types/assets/md2.d.ts.map +1 -0
  37. package/packages/engine/dist/types/assets/pak.d.ts +28 -0
  38. package/packages/engine/dist/types/assets/pak.d.ts.map +1 -0
  39. package/packages/engine/dist/types/assets/vfs.d.ts +23 -0
  40. package/packages/engine/dist/types/assets/vfs.d.ts.map +1 -0
  41. package/packages/engine/dist/types/configstrings.d.ts +34 -0
  42. package/packages/engine/dist/types/configstrings.d.ts.map +1 -0
  43. package/packages/engine/dist/types/cvars.d.ts +43 -0
  44. package/packages/engine/dist/types/cvars.d.ts.map +1 -0
  45. package/packages/engine/dist/types/host.d.ts +42 -0
  46. package/packages/engine/dist/types/host.d.ts.map +1 -0
  47. package/packages/engine/dist/types/index.d.ts +37 -0
  48. package/packages/engine/dist/types/index.d.ts.map +1 -0
  49. package/packages/engine/dist/types/loop.d.ts +40 -0
  50. package/packages/engine/dist/types/loop.d.ts.map +1 -0
  51. package/packages/engine/dist/types/render/bsp.d.ts +49 -0
  52. package/packages/engine/dist/types/render/bsp.d.ts.map +1 -0
  53. package/packages/engine/dist/types/render/context.d.ts +36 -0
  54. package/packages/engine/dist/types/render/context.d.ts.map +1 -0
  55. package/packages/engine/dist/types/render/resources.d.ts +56 -0
  56. package/packages/engine/dist/types/render/resources.d.ts.map +1 -0
  57. package/packages/engine/dist/types/render/shaderProgram.d.ts +18 -0
  58. package/packages/engine/dist/types/render/shaderProgram.d.ts.map +1 -0
  59. package/packages/engine/dist/types/runtime.d.ts +15 -0
  60. package/packages/engine/dist/types/runtime.d.ts.map +1 -0
  61. package/packages/game/dist/browser/index.global.js +2 -0
  62. package/packages/game/dist/browser/index.global.js.map +1 -0
  63. package/packages/game/dist/cjs/index.cjs +758 -0
  64. package/packages/game/dist/cjs/index.cjs.map +1 -0
  65. package/packages/game/dist/esm/index.js +725 -0
  66. package/packages/game/dist/esm/index.js.map +1 -0
  67. package/packages/game/dist/tsconfig.tsbuildinfo +1 -0
  68. package/packages/game/dist/types/entities/entity.d.ts +92 -0
  69. package/packages/game/dist/types/entities/entity.d.ts.map +1 -0
  70. package/packages/game/dist/types/entities/index.d.ts +3 -0
  71. package/packages/game/dist/types/entities/index.d.ts.map +1 -0
  72. package/packages/game/dist/types/entities/pool.d.ts +18 -0
  73. package/packages/game/dist/types/entities/pool.d.ts.map +1 -0
  74. package/packages/game/dist/types/entities/system.d.ts +18 -0
  75. package/packages/game/dist/types/entities/system.d.ts.map +1 -0
  76. package/packages/game/dist/types/entities/thinkScheduler.d.ts +8 -0
  77. package/packages/game/dist/types/entities/thinkScheduler.d.ts.map +1 -0
  78. package/packages/game/dist/types/index.d.ts +26 -0
  79. package/packages/game/dist/types/index.d.ts.map +1 -0
  80. package/packages/game/dist/types/level.d.ts +14 -0
  81. package/packages/game/dist/types/level.d.ts.map +1 -0
  82. package/packages/game/dist/types/loop.d.ts +29 -0
  83. package/packages/game/dist/types/loop.d.ts.map +1 -0
  84. package/packages/shared/dist/browser/index.global.js +2 -0
  85. package/packages/shared/dist/browser/index.global.js.map +1 -0
  86. package/packages/shared/dist/cjs/index.cjs +2793 -0
  87. package/packages/shared/dist/cjs/index.cjs.map +1 -0
  88. package/packages/shared/dist/esm/index.js +2594 -0
  89. package/packages/shared/dist/esm/index.js.map +1 -0
  90. package/packages/shared/dist/tsconfig.tsbuildinfo +1 -0
  91. package/packages/shared/dist/types/bsp/collision.d.ts +112 -0
  92. package/packages/shared/dist/types/bsp/collision.d.ts.map +1 -0
  93. package/packages/shared/dist/types/bsp/contents.d.ts +71 -0
  94. package/packages/shared/dist/types/bsp/contents.d.ts.map +1 -0
  95. package/packages/shared/dist/types/index.d.ts +25 -0
  96. package/packages/shared/dist/types/index.d.ts.map +1 -0
  97. package/packages/shared/dist/types/math/angles.d.ts +17 -0
  98. package/packages/shared/dist/types/math/angles.d.ts.map +1 -0
  99. package/packages/shared/dist/types/math/color.d.ts +12 -0
  100. package/packages/shared/dist/types/math/color.d.ts.map +1 -0
  101. package/packages/shared/dist/types/math/random.d.ts +48 -0
  102. package/packages/shared/dist/types/math/random.d.ts.map +1 -0
  103. package/packages/shared/dist/types/math/vec3.d.ts +76 -0
  104. package/packages/shared/dist/types/math/vec3.d.ts.map +1 -0
  105. package/packages/shared/dist/types/pmove/categorize.d.ts +36 -0
  106. package/packages/shared/dist/types/pmove/categorize.d.ts.map +1 -0
  107. package/packages/shared/dist/types/pmove/constants.d.ts +75 -0
  108. package/packages/shared/dist/types/pmove/constants.d.ts.map +1 -0
  109. package/packages/shared/dist/types/pmove/currents.d.ts +58 -0
  110. package/packages/shared/dist/types/pmove/currents.d.ts.map +1 -0
  111. package/packages/shared/dist/types/pmove/dimensions.d.ts +14 -0
  112. package/packages/shared/dist/types/pmove/dimensions.d.ts.map +1 -0
  113. package/packages/shared/dist/types/pmove/duck.d.ts +39 -0
  114. package/packages/shared/dist/types/pmove/duck.d.ts.map +1 -0
  115. package/packages/shared/dist/types/pmove/fly.d.ts +34 -0
  116. package/packages/shared/dist/types/pmove/fly.d.ts.map +1 -0
  117. package/packages/shared/dist/types/pmove/jump.d.ts +26 -0
  118. package/packages/shared/dist/types/pmove/jump.d.ts.map +1 -0
  119. package/packages/shared/dist/types/pmove/move.d.ts +58 -0
  120. package/packages/shared/dist/types/pmove/move.d.ts.map +1 -0
  121. package/packages/shared/dist/types/pmove/pmove.d.ts +36 -0
  122. package/packages/shared/dist/types/pmove/pmove.d.ts.map +1 -0
  123. package/packages/shared/dist/types/pmove/slide.d.ts +63 -0
  124. package/packages/shared/dist/types/pmove/slide.d.ts.map +1 -0
  125. package/packages/shared/dist/types/pmove/snap.d.ts +40 -0
  126. package/packages/shared/dist/types/pmove/snap.d.ts.map +1 -0
  127. package/packages/shared/dist/types/pmove/special.d.ts +39 -0
  128. package/packages/shared/dist/types/pmove/special.d.ts.map +1 -0
  129. package/packages/shared/dist/types/pmove/stuck.d.ts +21 -0
  130. package/packages/shared/dist/types/pmove/stuck.d.ts.map +1 -0
  131. package/packages/shared/dist/types/pmove/types.d.ts +48 -0
  132. package/packages/shared/dist/types/pmove/types.d.ts.map +1 -0
  133. package/packages/shared/dist/types/pmove/view.d.ts +19 -0
  134. package/packages/shared/dist/types/pmove/view.d.ts.map +1 -0
  135. package/packages/shared/dist/types/pmove/water.d.ts +21 -0
  136. package/packages/shared/dist/types/pmove/water.d.ts.map +1 -0
  137. package/packages/shared/dist/types/protocol/configstrings.d.ts +51 -0
  138. package/packages/shared/dist/types/protocol/configstrings.d.ts.map +1 -0
  139. package/packages/shared/dist/types/protocol/cvar.d.ts +15 -0
  140. package/packages/shared/dist/types/protocol/cvar.d.ts.map +1 -0
  141. package/packages/tools/dist/browser/index.global.js +2 -0
  142. package/packages/tools/dist/browser/index.global.js.map +1 -0
  143. package/packages/tools/dist/cjs/index.cjs +33 -0
  144. package/packages/tools/dist/cjs/index.cjs.map +1 -0
  145. package/packages/tools/dist/esm/index.js +8 -0
  146. package/packages/tools/dist/esm/index.js.map +1 -0
  147. package/packages/tools/dist/tsconfig.tsbuildinfo +1 -0
  148. package/packages/tools/dist/types/index.d.ts +7 -0
  149. package/packages/tools/dist/types/index.d.ts.map +1 -0
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Bitflag constants mirroring the Quake II rerelease `contents_t` and
3
+ * `surfflags_t` enumerations from `game.h`. The helpers here operate purely on
4
+ * numeric bitmasks so both the authoritative game simulation and the client can
5
+ * share the same semantic checks.
6
+ */
7
+ export type ContentsFlag = number;
8
+ export type SurfaceFlag = number;
9
+ export declare const CONTENTS_NONE: ContentsFlag;
10
+ export declare const CONTENTS_SOLID: ContentsFlag;
11
+ export declare const CONTENTS_WINDOW: ContentsFlag;
12
+ export declare const CONTENTS_AUX: ContentsFlag;
13
+ export declare const CONTENTS_LAVA: ContentsFlag;
14
+ export declare const CONTENTS_SLIME: ContentsFlag;
15
+ export declare const CONTENTS_WATER: ContentsFlag;
16
+ export declare const CONTENTS_MIST: ContentsFlag;
17
+ export declare const CONTENTS_NO_WATERJUMP: ContentsFlag;
18
+ export declare const CONTENTS_PROJECTILECLIP: ContentsFlag;
19
+ export declare const CONTENTS_AREAPORTAL: ContentsFlag;
20
+ export declare const CONTENTS_PLAYERCLIP: ContentsFlag;
21
+ export declare const CONTENTS_MONSTERCLIP: ContentsFlag;
22
+ export declare const CONTENTS_CURRENT_0: ContentsFlag;
23
+ export declare const CONTENTS_CURRENT_90: ContentsFlag;
24
+ export declare const CONTENTS_CURRENT_180: ContentsFlag;
25
+ export declare const CONTENTS_CURRENT_270: ContentsFlag;
26
+ export declare const CONTENTS_CURRENT_UP: ContentsFlag;
27
+ export declare const CONTENTS_CURRENT_DOWN: ContentsFlag;
28
+ export declare const CONTENTS_ORIGIN: ContentsFlag;
29
+ export declare const CONTENTS_MONSTER: ContentsFlag;
30
+ export declare const CONTENTS_DEADMONSTER: ContentsFlag;
31
+ export declare const CONTENTS_DETAIL: ContentsFlag;
32
+ export declare const CONTENTS_TRANSLUCENT: ContentsFlag;
33
+ export declare const CONTENTS_LADDER: ContentsFlag;
34
+ export declare const CONTENTS_PLAYER: ContentsFlag;
35
+ export declare const CONTENTS_PROJECTILE: ContentsFlag;
36
+ export declare const LAST_VISIBLE_CONTENTS: ContentsFlag;
37
+ export declare const SURF_NONE: SurfaceFlag;
38
+ export declare const SURF_LIGHT: SurfaceFlag;
39
+ export declare const SURF_SLICK: SurfaceFlag;
40
+ export declare const SURF_SKY: SurfaceFlag;
41
+ export declare const SURF_WARP: SurfaceFlag;
42
+ export declare const SURF_TRANS33: SurfaceFlag;
43
+ export declare const SURF_TRANS66: SurfaceFlag;
44
+ export declare const SURF_FLOWING: SurfaceFlag;
45
+ export declare const SURF_NODRAW: SurfaceFlag;
46
+ export declare const SURF_ALPHATEST: SurfaceFlag;
47
+ export declare const SURF_N64_UV: SurfaceFlag;
48
+ export declare const SURF_N64_SCROLL_X: SurfaceFlag;
49
+ export declare const SURF_N64_SCROLL_Y: SurfaceFlag;
50
+ export declare const SURF_N64_SCROLL_FLIP: SurfaceFlag;
51
+ export declare const MASK_ALL: ContentsFlag;
52
+ export declare const MASK_SOLID: ContentsFlag;
53
+ export declare const MASK_PLAYERSOLID: ContentsFlag;
54
+ export declare const MASK_DEADSOLID: ContentsFlag;
55
+ export declare const MASK_MONSTERSOLID: ContentsFlag;
56
+ export declare const MASK_WATER: ContentsFlag;
57
+ export declare const MASK_OPAQUE: ContentsFlag;
58
+ export declare const MASK_SHOT: ContentsFlag;
59
+ export declare const MASK_CURRENT: ContentsFlag;
60
+ export declare const MASK_BLOCK_SIGHT: ContentsFlag;
61
+ export declare const MASK_NAV_SOLID: ContentsFlag;
62
+ export declare const MASK_LADDER_NAV_SOLID: ContentsFlag;
63
+ export declare const MASK_WALK_NAV_SOLID: ContentsFlag;
64
+ export declare const MASK_PROJECTILE: ContentsFlag;
65
+ export declare function hasAllContents(mask: ContentsFlag, flags: ContentsFlag): boolean;
66
+ export declare function hasAnyContents(mask: ContentsFlag, flags: ContentsFlag): boolean;
67
+ export declare function addContents(mask: ContentsFlag, flags: ContentsFlag): ContentsFlag;
68
+ export declare function removeContents(mask: ContentsFlag, flags: ContentsFlag): ContentsFlag;
69
+ export declare function hasSurfaceFlags(surface: SurfaceFlag, flags: SurfaceFlag): boolean;
70
+ export declare function combineSurfaceFlags(...flags: SurfaceFlag[]): SurfaceFlag;
71
+ //# sourceMappingURL=contents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contents.d.ts","sourceRoot":"","sources":["../../../src/bsp/contents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC,eAAO,MAAM,aAAa,EAAE,YAAgB,CAAC;AAC7C,eAAO,MAAM,c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CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAE/E;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAE/E;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,YAAY,CAEjF;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,YAAY,CAEpF;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAEjF;AAED,wBAAgB,mBAAmB,CAAC,GAAG,KAAK,EAAE,WAAW,EAAE,GAAG,WAAW,CAMxE"}
@@ -0,0 +1,25 @@
1
+ export * from './math/vec3.js';
2
+ export * from './math/angles.js';
3
+ export * from './math/color.js';
4
+ export * from './math/random.js';
5
+ export * from './bsp/contents.js';
6
+ export * from './bsp/collision.js';
7
+ export * from './protocol/cvar.js';
8
+ export * from './protocol/configstrings.js';
9
+ export * from './pmove/types.js';
10
+ export * from './pmove/constants.js';
11
+ export * from './pmove/pmove.js';
12
+ export * from './pmove/slide.js';
13
+ export * from './pmove/stuck.js';
14
+ export * from './pmove/currents.js';
15
+ export * from './pmove/fly.js';
16
+ export * from './pmove/water.js';
17
+ export * from './pmove/jump.js';
18
+ export * from './pmove/dimensions.js';
19
+ export * from './pmove/duck.js';
20
+ export * from './pmove/categorize.js';
21
+ export * from './pmove/move.js';
22
+ export * from './pmove/special.js';
23
+ export * from './pmove/snap.js';
24
+ export * from './pmove/view.js';
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { Vec3 } from './vec3.js';
2
+ export declare const PITCH = 0;
3
+ export declare const YAW = 1;
4
+ export declare const ROLL = 2;
5
+ export interface AngleVectorsResult {
6
+ readonly forward: Vec3;
7
+ readonly right: Vec3;
8
+ readonly up: Vec3;
9
+ }
10
+ export declare function degToRad(degrees: number): number;
11
+ export declare function radToDeg(radians: number): number;
12
+ export declare function lerpAngle(from: number, to: number, frac: number): number;
13
+ export declare function angleMod(angle: number): number;
14
+ export declare function angleVectors(angles: Vec3): AngleVectorsResult;
15
+ export declare function vectorToYaw(vec: Vec3): number;
16
+ export declare function vectorToAngles(vec: Vec3): Vec3;
17
+ //# sourceMappingURL=angles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"angles.d.ts","sourceRoot":"","sources":["../../../src/math/angles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,eAAO,MAAM,KAAK,IAAI,CAAC;AACvB,eAAO,MAAM,GAAG,IAAI,CAAC;AACrB,eAAO,MAAM,IAAI,IAAI,CAAC;AAiBtB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;CACnB;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAUxE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,IAAI,GAAG,kBAAkB,CA+B7D;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,CAc7C;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CA6B9C"}
@@ -0,0 +1,12 @@
1
+ export type Color4 = [number, number, number, number];
2
+ /**
3
+ * TypeScript port of G_AddBlend from rerelease q_std.h.
4
+ *
5
+ * Given an incoming RGBA color and an existing blend color, computes the new
6
+ * blended color where alpha is accumulated and RGB is mixed proportionally
7
+ * to the previous vs. new alpha contribution.
8
+ *
9
+ * This function is pure and does not mutate its inputs.
10
+ */
11
+ export declare function addBlendColor(r: number, g: number, b: number, a: number, current: Color4): Color4;
12
+ //# sourceMappingURL=color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/math/color.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,OAAO,EAAE,MAAM,GACd,MAAM,CAuBR"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Minimal MT19937 implementation mirroring the rerelease's std::mt19937 usage in g_local.h.
3
+ * The generator outputs deterministic unsigned 32-bit integers which drive the
4
+ * higher-level helpers such as frandom/crandom/irandom.
5
+ */
6
+ export declare class MersenneTwister19937 {
7
+ private state;
8
+ private index;
9
+ constructor(seed?: number);
10
+ seed(seed: number): void;
11
+ nextUint32(): number;
12
+ private twist;
13
+ }
14
+ export interface RandomGeneratorOptions {
15
+ readonly seed?: number;
16
+ }
17
+ /**
18
+ * Deterministic helper mirroring the random helpers defined in rerelease g_local.h.
19
+ */
20
+ export declare class RandomGenerator {
21
+ private readonly mt;
22
+ constructor(options?: RandomGeneratorOptions);
23
+ /** Uniform float in [0, 1). */
24
+ frandom(): number;
25
+ /** Uniform float in [min, max). */
26
+ frandomRange(minInclusive: number, maxExclusive: number): number;
27
+ /** Uniform float in [0, max). */
28
+ frandomMax(maxExclusive: number): number;
29
+ /** Uniform float in [-1, 1). */
30
+ crandom(): number;
31
+ /** Uniform float in (-1, 1). */
32
+ crandomOpen(): number;
33
+ /** Raw uint32 sample. */
34
+ irandomUint32(): number;
35
+ /** Uniform integer in [min, max). */
36
+ irandomRange(minInclusive: number, maxExclusive: number): number;
37
+ /** Uniform integer in [0, max). */
38
+ irandom(maxExclusive: number): number;
39
+ /** Uniform time in milliseconds [min, max). */
40
+ randomTimeRange(minMs: number, maxMs: number): number;
41
+ /** Uniform time in milliseconds [0, max). */
42
+ randomTime(maxMs: number): number;
43
+ randomIndex<T extends {
44
+ length: number;
45
+ }>(container: T): number;
46
+ }
47
+ export declare function createRandomGenerator(options?: RandomGeneratorOptions): RandomGenerator;
48
+ //# sourceMappingURL=random.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../../src/math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
@@ -0,0 +1,76 @@
1
+ export interface Vec3 {
2
+ readonly x: number;
3
+ readonly y: number;
4
+ readonly z: number;
5
+ readonly [index: number]: number;
6
+ }
7
+ export declare const ZERO_VEC3: Vec3;
8
+ export declare const STOP_EPSILON = 0.1;
9
+ export interface Bounds3 {
10
+ readonly mins: Vec3;
11
+ readonly maxs: Vec3;
12
+ }
13
+ export type Mat3Row = readonly [number, number, number];
14
+ export type Mat3 = readonly [Mat3Row, Mat3Row, Mat3Row];
15
+ export declare function addVec3(a: Vec3, b: Vec3): Vec3;
16
+ export declare function subtractVec3(a: Vec3, b: Vec3): Vec3;
17
+ export declare function multiplyVec3(a: Vec3, b: Vec3): Vec3;
18
+ export declare function scaleVec3(a: Vec3, scalar: number): Vec3;
19
+ export declare function negateVec3(a: Vec3): Vec3;
20
+ export declare function dotVec3(a: Vec3, b: Vec3): number;
21
+ export declare function crossVec3(a: Vec3, b: Vec3): Vec3;
22
+ export declare function lengthSquaredVec3(a: Vec3): number;
23
+ export declare function lengthVec3(a: Vec3): number;
24
+ /**
25
+ * Returns the normalized vector. If the vector is zero-length, the
26
+ * input is returned to mirror the rerelease q_vec3 semantics.
27
+ */
28
+ export declare function normalizeVec3(a: Vec3): Vec3;
29
+ /**
30
+ * Projects a point onto a plane defined by the given normal.
31
+ * Based on ProjectPointOnPlane in the rerelease q_vec3 helpers.
32
+ */
33
+ export declare function projectPointOnPlane(point: Vec3, normal: Vec3): Vec3;
34
+ /**
35
+ * Computes a perpendicular vector to the provided direction using the
36
+ * smallest axial component heuristic used by the rerelease.
37
+ * Assumes the input is normalized.
38
+ */
39
+ export declare function perpendicularVec3(src: Vec3): Vec3;
40
+ export declare function closestPointToBox(point: Vec3, mins: Vec3, maxs: Vec3): Vec3;
41
+ export declare function distanceBetweenBoxesSquared(aMins: Vec3, aMaxs: Vec3, bMins: Vec3, bMaxs: Vec3): number;
42
+ export declare function createEmptyBounds3(): Bounds3;
43
+ export declare function addPointToBounds(point: Vec3, bounds: Bounds3): Bounds3;
44
+ export declare function boxesIntersect(a: Bounds3, b: Bounds3): boolean;
45
+ /**
46
+ * Mirrors PM_ClipVelocity from `rerelease/p_move.cpp`: slide the incoming velocity off
47
+ * a plane normal, applying an overbounce scale and zeroing tiny components so callers can
48
+ * detect blocked axes using STOP_EPSILON.
49
+ */
50
+ export declare function clipVelocityVec3(inVel: Vec3, normal: Vec3, overbounce: number): Vec3;
51
+ /**
52
+ * Slide a velocity across one or more clip planes using the same plane set resolution logic
53
+ * seen in the inner loop of `PM_StepSlideMove_Generic` (rerelease `p_move.cpp`). When a single
54
+ * plane is provided this devolves to PM_ClipVelocity; with two planes it projects onto the
55
+ * crease defined by their cross product; with more planes it zeroes the velocity to avoid
56
+ * oscillations.
57
+ */
58
+ export declare function clipVelocityAgainstPlanes(velocity: Vec3, planes: readonly Vec3[], overbounce: number, primalVelocity?: Vec3): Vec3;
59
+ /**
60
+ * Alias retained for ergonomics; mirrors PM_ClipVelocity semantics.
61
+ */
62
+ export declare function slideClipVelocityVec3(inVel: Vec3, normal: Vec3, overbounce: number): Vec3;
63
+ /**
64
+ * Project an offset from a point in forward/right(/up) space into world space.
65
+ * Mirrors G_ProjectSource and G_ProjectSource2 in rerelease q_vec3.
66
+ */
67
+ export declare function projectSourceVec3(point: Vec3, distance: Vec3, forward: Vec3, right: Vec3): Vec3;
68
+ export declare function projectSourceVec3WithUp(point: Vec3, distance: Vec3, forward: Vec3, right: Vec3, up: Vec3): Vec3;
69
+ /**
70
+ * Spherical linear interpolation between two vectors, mirroring q_vec3::slerp.
71
+ * This is intended for direction vectors; callers should pre-normalize if needed.
72
+ */
73
+ export declare function slerpVec3(from: Vec3, to: Vec3, t: number): Vec3;
74
+ export declare function concatRotationMatrices(a: Mat3, b: Mat3): Mat3;
75
+ export declare function rotatePointAroundVector(dir: Vec3, point: Vec3, degrees: number): Vec3;
76
+ //# sourceMappingURL=vec3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vec3.d.ts","source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AG,IAAI,CAEzF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,CAM/F;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,GAAG,IAAI,CAM/G;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAsB/D;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAS7D;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAsCrF"}
@@ -0,0 +1,36 @@
1
+ import { type ContentsFlag } from '../bsp/contents.js';
2
+ import { type Vec3 } from '../math/vec3.js';
3
+ import { type PmFlags, PmType } from './constants.js';
4
+ import type { PmovePointContentsFn, PmoveTraceFn, PmoveTraceResult } from './types.js';
5
+ export interface CategorizePositionParams {
6
+ readonly pmType: PmType;
7
+ readonly pmFlags: PmFlags;
8
+ readonly pmTime: number;
9
+ readonly n64Physics: boolean;
10
+ readonly velocity: Vec3;
11
+ readonly startVelocity: Vec3;
12
+ readonly origin: Vec3;
13
+ readonly mins: Vec3;
14
+ readonly maxs: Vec3;
15
+ readonly viewheight: number;
16
+ readonly trace: PmoveTraceFn;
17
+ readonly pointContents: PmovePointContentsFn;
18
+ }
19
+ export interface CategorizePositionResult {
20
+ readonly pmFlags: PmFlags;
21
+ readonly pmTime: number;
22
+ readonly onGround: boolean;
23
+ readonly groundTrace?: PmoveTraceResult;
24
+ readonly groundContents: ContentsFlag;
25
+ readonly waterlevel: number;
26
+ readonly watertype: ContentsFlag;
27
+ readonly impactDelta?: number;
28
+ }
29
+ /**
30
+ * Pure mirror of PM_CatagorizePosition from `rerelease/p_move.cpp`: traces a quarter-unit
31
+ * below the player bounds to determine whether they stand on solid ground, updates timers
32
+ * and pmflags accordingly, records the latest ground plane data, and recalculates waterlevel
33
+ * by probing feet/waist/viewheight samples.
34
+ */
35
+ export declare function categorizePosition(params: CategorizePositionParams): CategorizePositionResult;
36
+ //# sourceMappingURL=categorize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categorize.d.ts","sourceRoot":"","sources":["../../../src/pmove/categorize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAA6B,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAEL,KAAK,OAAO,EACZ,MAAM,EAIP,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAcvF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC;CAC9C;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC;IACxC,QAAQ,CAAC,cAAc,EAAE,YAAY,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,GAAG,wBAAwB,CAwG7F"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Mirrors the Quake II rerelease `water_level_t` enumeration from `game.h`
3
+ * (lines 443-449). These numeric values are relied upon throughout the
4
+ * movement code when checking how submerged a player is, so we keep the same
5
+ * ordering to make future porting work straightforward.
6
+ */
7
+ export declare enum WaterLevel {
8
+ None = 0,
9
+ Feet = 1,
10
+ Waist = 2,
11
+ Under = 3
12
+ }
13
+ /**
14
+ * Utility that matches the common rerelease checks that treat any level at or
15
+ * above the `WATER_WAIST` constant as "significantly submerged" for friction
16
+ * and current calculations.
17
+ */
18
+ export declare function isAtLeastWaistDeep(level: WaterLevel): boolean;
19
+ /**
20
+ * Returns true when the player is considered underwater (the `WATER_UNDER`
21
+ * case in the rerelease). This mirrors the places in `p_move.cpp` that gate
22
+ * effects such as breath timers and screen warping.
23
+ */
24
+ export declare function isUnderwater(level: WaterLevel): boolean;
25
+ /**
26
+ * Matches the Quake II rerelease `pmflags_t` bit layout from `game.h` so the
27
+ * shared helpers can manipulate the same flag words as the authoritative game
28
+ * and the client prediction layer.
29
+ */
30
+ export declare const enum PmFlag {
31
+ Ducked = 1,
32
+ JumpHeld = 2,
33
+ OnGround = 4,
34
+ TimeWaterJump = 8,
35
+ TimeLand = 16,
36
+ TimeTeleport = 32,
37
+ NoPositionalPrediction = 64,
38
+ OnLadder = 128,
39
+ NoAngularPrediction = 256,
40
+ IgnorePlayerCollision = 512,
41
+ TimeTrick = 1024
42
+ }
43
+ export type PmFlags = number;
44
+ export declare function hasPmFlag(flags: PmFlags, flag: PmFlag): boolean;
45
+ export declare function addPmFlag(flags: PmFlags, flag: PmFlag): PmFlags;
46
+ export declare function removePmFlag(flags: PmFlags, flag: PmFlag): PmFlags;
47
+ /**
48
+ * Player movement types mirrored from the rerelease `pmtype_t` enumeration.
49
+ * The exact numeric values matter when syncing pmove state across the network
50
+ * so we keep the same order as the C++ definition.
51
+ */
52
+ export declare enum PmType {
53
+ Normal = 0,
54
+ Grapple = 1,
55
+ NoClip = 2,
56
+ Spectator = 3,
57
+ Dead = 4,
58
+ Gib = 5,
59
+ Freeze = 6
60
+ }
61
+ /**
62
+ * Bitmask constants for the `buttons` field on the Quake II player command
63
+ * structure. These mirror the rerelease `BUTTON_*` definitions so logic such as
64
+ * jump/crouch checks can be shared between the server and client.
65
+ */
66
+ export declare const enum PlayerButton {
67
+ None = 0,
68
+ Attack = 1,
69
+ Use = 2,
70
+ Holster = 4,
71
+ Jump = 8,
72
+ Crouch = 16,
73
+ Any = 128
74
+ }
75
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/pmove/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,UAAU;IACpB,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,KAAK,IAAI;CACV;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAEvD;AAED;;;;GAIG;AACH,0BAAkB,MAAM;IACtB,MAAM,IAAS;IACf,QAAQ,IAAS;IACjB,QAAQ,IAAS;IACjB,aAAa,IAAS;IACtB,QAAQ,KAAS;IACjB,YAAY,KAAS;IACrB,sBAAsB,KAAS;IAC/B,QAAQ,MAAS;IACjB,mBAAmB,MAAS;IAC5B,qBAAqB,MAAS;IAC9B,SAAS,OAAU;CACpB;AAED,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAElE;AAED;;;;GAIG;AACH,oBAAY,MAAM;IAChB,MAAM,IAAI;IACV,OAAO,IAAI;IACX,MAAM,IAAI;IACV,SAAS,IAAI;IACb,IAAI,IAAI;IACR,GAAG,IAAI;IACP,MAAM,IAAI;CACX;AAED;;;;GAIG;AACH,0BAAkB,YAAY;IAC5B,IAAI,IAAI;IACR,MAAM,IAAS;IACf,GAAG,IAAS;IACZ,OAAO,IAAS;IAChB,IAAI,IAAS;IACb,MAAM,KAAS;IACf,GAAG,MAAS;CACb"}
@@ -0,0 +1,58 @@
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 { PmoveCmd, PmoveTraceFn } from './types.js';
5
+ export interface WaterCurrentParams {
6
+ readonly watertype: ContentsFlag;
7
+ readonly waterlevel: WaterLevel;
8
+ readonly onGround: boolean;
9
+ readonly waterSpeed: number;
10
+ }
11
+ export interface GroundCurrentParams {
12
+ readonly groundContents: ContentsFlag;
13
+ readonly scale?: number;
14
+ }
15
+ export interface AddCurrentsParams {
16
+ readonly wishVelocity: Vec3;
17
+ readonly onLadder: boolean;
18
+ readonly onGround: boolean;
19
+ readonly waterlevel: WaterLevel;
20
+ readonly watertype: ContentsFlag;
21
+ readonly groundContents: ContentsFlag;
22
+ readonly cmd: PmoveCmd;
23
+ readonly viewPitch: number;
24
+ readonly maxSpeed: number;
25
+ readonly ladderMod: number;
26
+ readonly waterSpeed: number;
27
+ readonly forward: Vec3;
28
+ readonly origin: Vec3;
29
+ readonly mins: Vec3;
30
+ readonly maxs: Vec3;
31
+ readonly trace?: PmoveTraceFn;
32
+ }
33
+ /**
34
+ * Mirrors the rerelease pattern in `p_move.cpp` (lines 730-765) that turns the
35
+ * directional CONTENTS_CURRENT_* flags into a unit-ish direction vector.
36
+ */
37
+ export declare function currentVectorFromContents(contents: ContentsFlag): Vec3;
38
+ /**
39
+ * Computes the velocity contribution from water currents using the same rules
40
+ * as `PM_WaterMove`: the CONTENTS_CURRENT_* bits are turned into a direction
41
+ * vector, scaled by `pm_waterspeed`, and halved when the player only has their
42
+ * feet submerged while standing on solid ground.
43
+ */
44
+ export declare function waterCurrentVelocity(params: WaterCurrentParams): Vec3;
45
+ /**
46
+ * Computes the conveyor-style velocity that should be applied while touching a
47
+ * ground plane that carries CONTENTS_CURRENT_* bits. The rerelease multiplies
48
+ * the direction vector by 100 units per second, so we expose the same default
49
+ * while allowing callers to override the scalar for tests.
50
+ */
51
+ export declare function groundCurrentVelocity(params: GroundCurrentParams): Vec3;
52
+ /**
53
+ * Pure mirror of PM_AddCurrents from rerelease `p_move.cpp`: handles ladder
54
+ * specific motion tweaks, water currents, and conveyor-style ground currents
55
+ * before pmove acceleration is applied.
56
+ */
57
+ export declare function applyPmoveAddCurrents(params: AddCurrentsParams): Vec3;
58
+ //# sourceMappingURL=currents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currents.d.ts","sourceRoot":"","sources":["../../../src/pmove/currents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE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AAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;CAC/B;AAiBD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CA6BtE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAkBrE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CASvE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAoDrE"}
@@ -0,0 +1,14 @@
1
+ import type { Vec3 } from '../math/vec3.js';
2
+ import { type PmFlags, PmType } from './constants.js';
3
+ export interface PlayerDimensions {
4
+ readonly mins: Vec3;
5
+ readonly maxs: Vec3;
6
+ readonly viewheight: number;
7
+ }
8
+ /**
9
+ * Pure mirror of PM_SetDimensions from rerelease `p_move.cpp`.
10
+ * Computes the mins/maxs/viewheight triplet for a player based on
11
+ * their movement type and ducked flag without mutating inputs.
12
+ */
13
+ export declare function computePlayerDimensions(pmType: PmType, pmFlags: PmFlags): PlayerDimensions;
14
+ //# sourceMappingURL=dimensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dimensions.d.ts","sourceRoot":"","sources":["../../../src/pmove/dimensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAMD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAqB1F"}
@@ -0,0 +1,39 @@
1
+ import { type ContentsFlag } from '../bsp/contents.js';
2
+ import type { Vec3 } from '../math/vec3.js';
3
+ import { type PmFlags, PmType, WaterLevel } from './constants.js';
4
+ import type { PmoveTraceResult } from './types.js';
5
+ import { type PlayerDimensions } from './dimensions.js';
6
+ export interface DuckTraceParams {
7
+ readonly start: Vec3;
8
+ readonly end: Vec3;
9
+ readonly mins: Vec3;
10
+ readonly maxs: Vec3;
11
+ readonly mask: ContentsFlag;
12
+ }
13
+ export type DuckTraceFn = (params: DuckTraceParams) => PmoveTraceResult;
14
+ export interface CheckDuckParams {
15
+ readonly pmType: PmType;
16
+ readonly pmFlags: PmFlags;
17
+ readonly buttons: number;
18
+ readonly waterlevel: WaterLevel;
19
+ readonly hasGroundEntity: boolean;
20
+ readonly onLadder: boolean;
21
+ readonly n64Physics: boolean;
22
+ readonly origin: Vec3;
23
+ readonly mins: Vec3;
24
+ readonly maxs: Vec3;
25
+ readonly trace: DuckTraceFn;
26
+ }
27
+ export interface CheckDuckResult extends PlayerDimensions {
28
+ readonly pmFlags: PmFlags;
29
+ readonly ducked: boolean;
30
+ readonly changed: boolean;
31
+ }
32
+ /**
33
+ * Pure port of PM_CheckDuck from rerelease `p_move.cpp`. Updates the PMF_DUCKED flag
34
+ * based on crouch input, obstruction traces, and special cases (dead bodies) without
35
+ * mutating the provided mins/maxs. Returns the updated flag word plus the dimensions
36
+ * computed from PM_SetDimensions so callers can update collision bounds atomically.
37
+ */
38
+ export declare function checkDuckState(params: CheckDuckParams): CheckDuckResult;
39
+ //# sourceMappingURL=duck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duck.d.ts","sourceRoot":"","sources":["../../../src/pmove/duck.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,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B,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CA8BvE"}
@@ -0,0 +1,34 @@
1
+ import { type Vec3 } from '../math/vec3.js';
2
+ import { type StepSlideMoveOutcome } from './slide.js';
3
+ import type { PmoveCmd, PmoveTraceFn } from './types.js';
4
+ export interface FlyMoveParams {
5
+ readonly origin: Vec3;
6
+ readonly velocity: Vec3;
7
+ readonly cmd: PmoveCmd;
8
+ readonly forward: Vec3;
9
+ readonly right: Vec3;
10
+ readonly frametime: number;
11
+ readonly pmFriction: number;
12
+ readonly pmStopSpeed: number;
13
+ readonly pmMaxSpeed: number;
14
+ readonly pmAccelerate: number;
15
+ readonly pmWaterSpeed: number;
16
+ readonly doclip: boolean;
17
+ readonly mins?: Vec3;
18
+ readonly maxs?: Vec3;
19
+ readonly trace?: PmoveTraceFn;
20
+ readonly overbounce?: number;
21
+ readonly stepSize?: number;
22
+ readonly maxBumps?: number;
23
+ readonly maxClipPlanes?: number;
24
+ }
25
+ export type FlyMoveResult = StepSlideMoveOutcome;
26
+ /**
27
+ * Pure translation of PM_FlyMove from rerelease `p_move.cpp`: applies the
28
+ * spectator/noclip friction and acceleration rules, then either advances the
29
+ * origin freely or resolves movement through `stepSlideMove` when clipping is
30
+ * requested. This keeps the spectator and noclip physics deterministic between
31
+ * the client and server.
32
+ */
33
+ export declare function applyPmoveFlyMove(params: FlyMoveParams): FlyMoveResult;
34
+ //# sourceMappingURL=fly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fly.d.ts","sourceRoot":"","sources":["../../../src/pmove/fly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAG3F,OAAO,EAAiB,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAMzD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAEjD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAwEtE"}
@@ -0,0 +1,26 @@
1
+ import type { Vec3 } from '../math/vec3.js';
2
+ import { WaterLevel, type PmFlags, PmType } from './constants.js';
3
+ export interface CheckJumpParams {
4
+ readonly pmFlags: PmFlags;
5
+ readonly pmType: PmType;
6
+ readonly buttons: number;
7
+ readonly waterlevel: WaterLevel;
8
+ readonly onGround: boolean;
9
+ readonly velocity: Vec3;
10
+ readonly jumpHeight?: number;
11
+ }
12
+ export interface CheckJumpResult {
13
+ readonly pmFlags: PmFlags;
14
+ readonly onGround: boolean;
15
+ readonly velocity: Vec3;
16
+ readonly jumpSound: boolean;
17
+ readonly jumped: boolean;
18
+ }
19
+ /**
20
+ * Pure translation of the rerelease `PM_CheckJump` helper from `p_move.cpp`.
21
+ * The function takes in the minimal pmove state that the original C++ logic
22
+ * touches and returns the updated flag/origin/velocity tuple so callers can
23
+ * apply the same semantics on both the server and client.
24
+ */
25
+ export declare function checkJump(params: CheckJumpParams): CheckJumpResult;
26
+ //# sourceMappingURL=jump.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jump.d.ts","sourceRoot":"","sources":["../../../src/pmove/jump.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,KAAK,OAAO,EAAU,MAAM,EAAyC,MAAM,gBAAgB,CAAC;AAIjH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAMD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAgDlE"}