Skip to content

server: validate client-reported hit geometry - #1722

Open
acts-1631 wants to merge 1 commit into
redeclipse:masterfrom
acts-1631:fix-server-hit-validation
Open

acts-1631 wants to merge 1 commit into
redeclipse:masterfrom
acts-1631:fix-server-hit-validation

Conversation

@acts-1631

Copy link
Copy Markdown

The server accepts client-reported hitsets from N_DESTROY after only checking sender ownership and shot ID. In destroyevent::process in src/game/server.cpp, the non-projectile-hit path uses client-supplied target, flags, distance, direction, and velocity to call dodamage(). A connected player can therefore report damage for a target that was not intersected by the shot, enabling fabricated hits and unearned kills or scores.

Record each accepted N_SHOOT ray in the server-side weapon-shot state and validate the reported origin and destination against the shooter’s and target’s server-tracked bounding cylinders before applying damage. Reject hitsets without a matching, geometrically valid shot.

The validation covers participant geometry and does not add map-occlusion tracing to the dedicated server.

@acts-1631
acts-1631 requested a review from a team as a code owner September 15, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant