Iw4 tu6 barrier clipping dvar - #223
Open
regenerance wants to merge 1 commit into
Open
Conversation
michaeloliverx
force-pushed
the
iw4-tu6-barriers
branch
from
September 1, 2026 12:22
6dee9d6 to
bf39ebb
Compare
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.
IW4 TU6: Add map barrier clipping removal
Summary
Adds an optional
bg_removeBarriersdvar to IW4 TU6 that allows players to clip through map barriers.bg_removeBarriers 0— normal map barrier behavior.bg_removeBarriers 1— removes the relevant barrier collision from player movement, allowing access to areas normally blocked by map barriers, including rooftops and other restricted areas.This is implemented through the player movement trace mask and does not modify map collision data.
Implementation
The movement code now defines:
When
bg_removeBarriersis enabled,PmoveSinglechangespm->tracemaskto removeMASK_PLAYER_CLIPand addMASK_BARRIER_CLIP.The normal
PmoveSingleimplementation is still called, so this only changes the collision mask used by player movement.Ladder handling
Removing player clipping affects ladder checks, so
PM_CheckLadderMoveis handled separately and temporarily restoresMASK_PLAYER_CLIPwhile the ladder check runs.Ladder behavior is not 100% preserved with
bg_removeBarriersenabled. There are still some limitations due to how the movement and collision system handles the modified trace mask, but the current implementation provides the best ladder behavior possible with this approach without making the change significantly more invasive.Dvar Synchronization
Adds:
This is required for
bg_removeBarriersto be handled as a CODINFO dvar and properly synchronized to clients, ensuring clients receive and use the correct dvar state.Files Changed
src/game/iw4/mp_tu6/components/pm.cppbg_removeBarriers.PmoveSinglehook for barrier removal.PM_CheckLadderMovehook for ladder handling.src/game/iw4/mp_tu6/symbols.hPmoveSingleandPM_CheckLadderMovehooks.src/game/iw4/mp_tu6/structs.hDVAR_CODINFO = 0x08.Testing
Tested in-game on IW4 TU6.
Verified:
bg_removeBarriers 1.bg_removeBarriers 0.Scope
This change is limited to IW4 Multiplayer TU6 and is disabled by default.
No map assets or collision geometry are modified.