import type { ContentsFlag } from '../bsp/contents.js'; import { type Vec3 } from '../math/vec3.js'; import { WaterLevel } from './constants.js'; import type { PmoveCmd, PmoveTraceFn } from './types.js'; export interface WaterCurrentParams { readonly watertype: ContentsFlag; readonly waterlevel: WaterLevel; readonly onGround: boolean; readonly waterSpeed: number; } export interface GroundCurrentParams { readonly groundContents: ContentsFlag; readonly scale?: number; } export interface AddCurrentsParams { readonly wishVelocity: Vec3; readonly onLadder: boolean; readonly onGround: boolean; readonly waterlevel: WaterLevel; readonly watertype: ContentsFlag; readonly groundContents: ContentsFlag; readonly cmd: PmoveCmd; readonly viewPitch: number; readonly maxSpeed: number; readonly ladderMod: number; readonly waterSpeed: number; readonly forward: Vec3; readonly origin: Vec3; readonly mins: Vec3; readonly maxs: Vec3; readonly trace?: PmoveTraceFn; } /** * Mirrors the rerelease pattern in `p_move.cpp` (lines 730-765) that turns the * directional CONTENTS_CURRENT_* flags into a unit-ish direction vector. */ export declare function currentVectorFromContents(contents: ContentsFlag): Vec3; /** * Computes the velocity contribution from water currents using the same rules * as `PM_WaterMove`: the CONTENTS_CURRENT_* bits are turned into a direction * vector, scaled by `pm_waterspeed`, and halved when the player only has their * feet submerged while standing on solid ground. */ export declare function waterCurrentVelocity(params: WaterCurrentParams): Vec3; /** * Computes the conveyor-style velocity that should be applied while touching a * ground plane that carries CONTENTS_CURRENT_* bits. The rerelease multiplies * the direction vector by 100 units per second, so we expose the same default * while allowing callers to override the scalar for tests. */ export declare function groundCurrentVelocity(params: GroundCurrentParams): Vec3; /** * Pure mirror of PM_AddCurrents from rerelease `p_move.cpp`: handles ladder * specific motion tweaks, water currents, and conveyor-style ground currents * before pmove acceleration is applied. */ export declare function applyPmoveAddCurrents(params: AddCurrentsParams): Vec3; //# sourceMappingURL=currents.d.ts.map