Skip to content

Commit

Permalink
Exclude entities that cannot collide with a Trigger instance
Browse files Browse the repository at this point in the history
  • Loading branch information
steffen-wilke committed Dec 12, 2021
1 parent 4a24304 commit 1bcdf2a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ private boolean checkActivationPredicates(TriggerEvent te) {
private List<IEntity> getEntitiesInCollisionBox() {
final List<IEntity> collEntities = new CopyOnWriteArrayList<>();
for (final ICollisionEntity coll : Game.physics().getCollisionEntities()) {
if (coll == this
if (coll == this || !coll.canCollideWith(this)
|| !this.activators.isEmpty() && !this.activators.contains(coll.getMapId())) {
continue;
}
Expand Down

0 comments on commit 1bcdf2a

Please sign in to comment.