Repository navigation
Pr 2779 rebased - #2887
Merged
Merged
Pr 2779 rebased#2887
Conversation
(cherry picked from commit dcb3be6)
(cherry picked from commit dec88a3)
…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.
Collaborator
Author
|
Needs ingame testing before merge |
Collaborator
|
Its been running fine for a month on krakow |
johnoclockdk
previously requested changes
Aug 24, 2026
johnoclockdk
approved these changes
Aug 24, 2026
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.
"Prevent containers and workbench to be visible through walls + crafting QOL #2779"