Skip to content

Commit 717312d

Browse files
authored
Fixed not being able to use entities through water and clip brushes (#1826)
1 parent 4475d44 commit 717312d

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel
77
### Fixed
88

99
- Fixed guns not applying themselves as their damage inflictor (by @TW1STaL1CKY)
10+
- Fixed not being able to use entities through water and clip brushes (by @TW1STaL1CKY)
1011

1112
## [v0.14.4b](https://github.com/TTT-2/TTT2/tree/v0.14.4b) (2025-06-15)
1213

gamemodes/terrortown/gamemode/client/cl_keys.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,13 @@ function GM:PlayerBindPress(ply, bindName, pressed)
8080
local useEnt = markerVision.GetFocusedEntity()
8181
local isRemote = IsValid(useEnt)
8282
if not isRemote then
83+
local shootPos = ply:GetShootPos()
84+
8385
local tr = util.TraceLine({
84-
start = ply:GetShootPos(),
85-
endpos = ply:GetShootPos() + ply:GetAimVector() * 100,
86+
start = shootPos,
87+
endpos = shootPos + ply:GetAimVector() * 100,
8688
filter = ply,
87-
mask = MASK_ALL,
89+
mask = bit.bor(MASK_SOLID, CONTENTS_DEBRIS),
8890
})
8991

9092
useEnt = tr.Entity

0 commit comments

Comments
 (0)