if (npc->is_blocked(to))
if (npc->is_pos_invalid() || npc->is_blocked(to))
inline bool Is_step_okay	(	Actor *npc,			// NPC to take the step.	Actor *leader,			// NPC he's following.	Tile_coord to			// Tile to step to.	)	{	if (npc->is_blocked(to))	// (To.tz is updated.)		return false;	int difftz = to.tz - leader->get_lift();	difftz *= difftz;		// Deltaz squared.	if (difftz > 4)			// More than 2?		return false;		// We'll want to find best dir.					// How close in XY?	int dist = to.distance(leader->get_tile());	if (dist == 1)		return (difftz <= 1);	// 1 tile away, so want dz <= 1.	if (!Clear_to_leader(npc, leader, to))		return false;		// Couldn't take a 2nd step.	return true;	}