Added check to stop attacking enemies in spawn areas