Added a check to stop npc's moving into underground caves.