Repository navigation
Soft player collision: pass-through movement + push-apart separation - #15
Open
bryankruman wants to merge 2 commits into
Open
bryankruman wants to merge 2 commits into
bryankruman wants to merge 2 commits into
Conversation
…ftcollision) Players no longer hard-block each other's movement. The movement hull traces switch to a new MoveFilter.NoPlayers (clips like Normal, but SOLID_SLIDEBOX + FL_CLIENT bodies never block), so crossing paths at speed is a clean slip and you can walk through someone deliberately. Overlapping bodies are resolved by a new server-side PlayerSeparation pass (GameWorld.OnEndFrame): a gentle, symmetric, horizontal-only positional slide (sv_player_softcollision_pushspeed, default 150 u/s per pair) that eases out exactly at contact, so co-located players settle side by side without jitter or fling. Trace-guarded against world geometry; frozen statues stay put; weapon/hitscan/melee traces are untouched (players stay fully shootable); monsters still block. sv_player_softcollision defaults ON (0 restores stock solid players) and rides the MoveVarsBlock wire (v9, slot 50) so remote-client prediction picks the same clip filter as the authority. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # docs/reference/CVARS.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces hard player-vs-player body-blocking with soft collision (on by default,
sv_player_softcollision 0restores stock behavior):MoveFilter.NoPlayers— clips exactly likeNormalexcept player bodies (SOLID_SLIDEBOX+FL_CLIENT) never block. All player movement-hull traces inPlayerPhysics(main slide/PushEntity, ground downtrace, ramp check, crouch stand-up,IsFlying) route through a cvar-gatedPlayerClipFilter(). Running through someone at speed is a clean slip; you can deliberately walk through a standing player.PlayerSeparationpass (first step ofGameWorld.OnEndFrame, after all players have moved). Overlapping hulls slide apart positionally — horizontal-only, split symmetrically, atsv_player_softcollision_pushspeed(default 150 u/s per pair) with each step capped at the remaining penetration, so bodies ease out and settle exactly side by side (no jitter at contact, no fling).Why
Requested gameplay change for Vortex Arena: fast crossing paths should have minimal interaction; standing overlap should gently resolve to adjacent positions; body-blocking should be impossible.
Reviewer notes
SLIDEBOX + FL_MONSTER) still block movement.sv_player_softcollisionrides theMoveVarsBlockwire (v9, slot 50, append-only;AbsentDefaultscarries the unset→ON semantics), read ambiently byPlayerPhysicslikesv_gameplayfix_nudgeoutofsolid. The separation push itself is server-only/unpredicted — at ≤75 u/s per body the reconcile smoothing absorbs it.NoPlayersfilter so a third body can't wedge the push), never vertical, skip dead bodies/spectators, keep frozen statues immobile (free body absorbs the full push), and use a deterministic pair-keyed direction for fully co-located bodies (no RNG stream advances). Moved bodies are relinked into the entity area grid.docs/reference/CVARS.mdhad committed merge-conflict markers inside the generated inventory — cleaned up during the regen (which also picks up the two new cvars).PlayerSoftCollisionTests(filter skip vs players/monsters, settle-adjacent, symmetric midpoint, one-tick deflection bound, cvar off, dead-body exemption);SnapshotDeltaTestswire-count pin updated 49→50. Full suite: 2991 green.sv_player_softcollision_pushspeedby feel.🤖 Generated with Claude Code