Raycast has an overload for predicates, various fixes (#848)

This commit is contained in:
Víctor Aguilera Puerto
2020-04-25 11:37:59 +02:00
committed by GitHub
parent a535567317
commit 55c54e415b
3 changed files with 34 additions and 10 deletions

View File

@@ -60,7 +60,7 @@ namespace Content.Client.State
var playerPos = _playerManager.LocalPlayer.ControlledEntity.Transform.MapPosition;
var entityPos = entityToClick.Transform.WorldPosition;
inRange = _entitySystemManager.GetEntitySystem<SharedInteractionSystem>()
.InRangeUnobstructed(playerPos,entityPos,ignoredEnt: _playerManager.LocalPlayer.ControlledEntity);
.InRangeUnobstructed(playerPos, entityPos, predicate:entity => entity != _playerManager.LocalPlayer.ControlledEntity || entity != entityToClick);
}
InteractionOutlineComponent outline;