Skip to content

Pr 2779 rebased - #2887

Merged
Z1Meme merged 6 commits into
devfrom
pr-2779-rebased
Aug 24, 2026
Merged

Z1Meme merged 6 commits into
devfrom
pr-2779-rebased

Conversation

@Z1Meme

@Z1Meme Z1Meme commented Aug 23, 2026 •

Copy link
Copy Markdown
Collaborator

"Prevent containers and workbench to be visible through walls + crafting QOL #2779"

Fabian and others added 4 commits August 23, 2026 15:06
…ealth mask

Extend the existing permission+containment spawn gate (shouldHideEntity) so a client standing
inside the shelter/shack sees its contents regardless of permission, alongside the existing
secured+inside+no-VISIT hide. The gate stays on stable inputs (parent.isSecured, isInside,
getHasPermission), so it does not flap.

Add an immediate re-eval (reevalShelterEntityVisibility) run on door open/close/place/destroy
so contained containers/workbenches are revealed or culled at once instead of on the next
spawn/cull sweep; it reuses shouldHideEntity + spawnEntityForClient and never sends
Character.RemovePlayer for a client's own character.

Send a well-formed { characterId, healthPercentage: 100 } on the damage-path health-bar hide
(was a bare number that packed as characterId 0 / 0%), and mask the health bar at spawn via
getSimpleNpcCheckHidden in addSimpleNpc for the same permission-gated entities.
…ibility blinking

Replace the mutable isHidden-string equality that gated player visibility with a stable
predicate (shouldHidePlayer) computed from the same inputs as the entity gate: the target is
inside a secured shelter/shack, the viewer is not inside it, and the viewer is not a group
member with VISIT. Two players inside the same shelter both fail the viewer-not-inside clause,
so they always see each other; outsiders without permission don't. Because the decision reads
positions and isSecured (not a flag written asynchronously on movement), spawn and cull agree
and no longer blink.

Gate spawnCharacters and spawnCharacterToOtherClients on the predicate, route the
constructionHidePlayer cull through it, and re-eval players inside a shelter on door
open/close/place/destroy. isHidden is still set for AI targeting and loot checks. Every
RemovePlayer cull guards the target is not the viewer's own character.
@Z1Meme

Z1Meme commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator Author

Needs ingame testing before merge

@looc343

looc343 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Its been running fine for a month on krakow

Comment thread src/utils/utils.ts Outdated
@Z1Meme
Z1Meme merged commit 56785e5 into dev Aug 24, 2026
18 of 20 checks passed
@Z1Meme
Z1Meme deleted the pr-2779-rebased branch August 24, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-2016 About the 2016 client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants