mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Visibility moved from session to EyeComponent (#1657)
This commit is contained in:
@@ -471,8 +471,11 @@ namespace Robust.Server.GameObjects
|
||||
// scan pvs box and include children and parents recursively
|
||||
IncludeRelatives(GetEntitiesInRange(mapId, position, range, true), relatives);
|
||||
|
||||
if (player.AttachedEntity is null || !player.AttachedEntity.TryGetComponent<EyeComponent>(out var eyeComp))
|
||||
eyeComp = null;
|
||||
|
||||
// Exclude any entities that are currently invisible to the player.
|
||||
ExcludeInvisible(relatives, player.VisibilityMask);
|
||||
ExcludeInvisible(relatives, (int)(eyeComp?.VisibilityMask ?? 0));
|
||||
|
||||
// Always send updates for all grid and map entities.
|
||||
// If we don't, the client-side game state manager WILL blow up.
|
||||
|
||||
Reference in New Issue
Block a user