import { type ContentsFlag } from '../bsp/contents.js'; import type { Vec3 } from '../math/vec3.js'; import { type PmFlags, PmType, WaterLevel } from './constants.js'; import type { PmoveTraceResult } from './types.js'; import { type PlayerDimensions } from './dimensions.js'; export interface DuckTraceParams { readonly start: Vec3; readonly end: Vec3; readonly mins: Vec3; readonly maxs: Vec3; readonly mask: ContentsFlag; } export type DuckTraceFn = (params: DuckTraceParams) => PmoveTraceResult; export interface CheckDuckParams { readonly pmType: PmType; readonly pmFlags: PmFlags; readonly buttons: number; readonly waterlevel: WaterLevel; readonly hasGroundEntity: boolean; readonly onLadder: boolean; readonly n64Physics: boolean; readonly origin: Vec3; readonly mins: Vec3; readonly maxs: Vec3; readonly trace: DuckTraceFn; } export interface CheckDuckResult extends PlayerDimensions { readonly pmFlags: PmFlags; readonly ducked: boolean; readonly changed: boolean; } /** * Pure port of PM_CheckDuck from rerelease `p_move.cpp`. Updates the PMF_DUCKED flag * based on crouch input, obstruction traces, and special cases (dead bodies) without * mutating the provided mins/maxs. Returns the updated flag word plus the dimensions * computed from PM_SetDimensions so callers can update collision bounds atomically. */ export declare function checkDuckState(params: CheckDuckParams): CheckDuckResult; //# sourceMappingURL=duck.d.ts.map