

class ActorTargetChecker { // Credit to Gutawer  and Bauul on Doomworld for this code (https://www.doomworld.com/forum/topic/101126-acs-check-if-a-monster-is-awake/)
    static bool hasTarget(Actor activator, int tid) {
        ActorIterator it = ActorIterator.create(tid);
        Actor mo = it.next();
        if (mo != NULL) return mo.target != NULL;
        else return false;
    }
}