Checks if target is still valid (some trailing event target ids?)

This commit is contained in:
Collin Smith
2020-09-10 18:40:27 -07:00
parent 28d6eddcb6
commit 61985ed440

View File

@ -123,6 +123,7 @@ public class Actioneer extends PassiveSystem {
break;
case 1: // attack
if (targetId == Engine.INVALID_ENTITY) return;
if (!mAttributesWrapper.has(targetId)) return;
log.debug("{} attack {}", entityId, targetId);
Attributes attrs = mAttributesWrapper.get(targetId).attrs;