You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PlaceableEntityBase: Entity does not stick on displacements #1881
I was attempting to check why The Soap did not stick to displacements when I found #1443, out of curiosity I checked C4 too and it's equally as broken
I believe ttt_base_placeable's StickEntity() is not welding again, or at least not on displacements., as it works on 90° walls and what seems to be 45° walls.
8mb.video-XZG-4PlnAQXh.mp4
Context:
Map: gm_construct
TTT Version: Workshop v0.14.6b
Workshop addons: (On video) TTT2 Base, ULX, Ulib, ULX Commands for TTT2, and The Soap. Reproduced also without any addons but base.
Garry's mod:
Protocol version 24
Network version 2026.04.29 (garrysmod)
Exe build: 16:23:51 Aug 12 2026 (10119) (4000)
GMod version 2026.08.13, branch: x86-64, multicore: 1
Linux 64-bit
Description:
Entities meant to stick to surfaces with StickEntity() do not on displacements.
Expected behavior:
Stick to any surface, it cannot be picked up with the magneto stick nor moved by explosions or props.
Actual behavior:
It indeed cannot be moved on non-displacements, but it can move on displacements.
Reproduction:
Just stick to any displacement
For a more consistent setup:
Load gm_construct
Buy a C4.
Travel to setpos 737.069092 1271.803223 -45.271919;setang 53.787880 92.438278 0.000000
changed the title [-]PlaceableEntityBase: Movement with magneto stick possible (again)[/-][+]PlaceableEntityBase: Entity does not stick on displacements[/+]on Aug 21, 2026
Disclamer: I first tried Vector(0,0,1), it did not work. I tried Vector(0,0,2), it worked for Soap but not C4, I tried Vector(0,0,4) then it worked for both. If this fix is taken, which seems like a bandaid tbh, a good value needs to be found.
Activity
[-]PlaceableEntityBase: Movement with magneto stick possible (again)[/-][+]PlaceableEntityBase: Entity does not stick on displacements[/+]xproot commentedon Aug 21, 2026
I believe I have traced the bug to:
TTT2/gamemodes/terrortown/entities/entities/ttt_base_placeable.lua
Lines 196 to 201 in 30e6b13
It does not hit when on a displacement, and I argue this is because the entity clips a little bit into the ground. Adding
local tr = util.TraceEntity({ - start = pos, + start = pos + Vector(0, 0, 4), endpos = pos - Vector(0, 0, 16), filter = ignore, mask = MASK_ALL, }, self)fixes both C4 and Soap sticking
Disclamer: I first tried Vector(0,0,1), it did not work. I tried Vector(0,0,2), it worked for Soap but not C4, I tried Vector(0,0,4) then it worked for both. If this fix is taken, which seems like a bandaid tbh, a good value needs to be found.
xproot commentedon Sep 4, 2026
please fix this i beg