Skip to content

PlaceableEntityBase: Entity does not stick on displacements #1881

Open

Description

@xproot

Possibly a continuation of #1443

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:

  1. Load gm_construct
  2. Buy a C4.
  3. Travel to setpos 737.069092 1271.803223 -45.271919;setang 53.787880 92.438278 0.000000
  4. Stick to the ground with Right Click.
  5. Attempt to pick up with the magneto stick.

Activity

  1. changed the title [-]PlaceableEntityBase: Movement with magneto stick possible (again)[/-] [+]PlaceableEntityBase: Entity does not stick on displacements[/+] on Aug 21, 2026
  2. xproot commented on Aug 21, 2026

    @xproot
    Author

    I believe I have traced the bug to:

    local tr = util.TraceEntity({
    start = pos,
    endpos = pos - Vector(0, 0, 16),
    filter = ignore,
    mask = MASK_SOLID,
    }, self)

    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.

  3. xproot commented on Sep 4, 2026

    @xproot
    Author

    please fix this i beg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions