Пример #1
0
void NPC::NextGuardPosition() {
	if (!CalculateNewPosition2(m_GuardPoint.x, m_GuardPoint.y, m_GuardPoint.z, GetMovespeed())) {
		SetHeading(m_GuardPoint.w);
		Log.Out(Logs::Detail, Logs::AI, "Unable to move to next guard position. Probably rooted.");
	}
	else if((m_Position.x == m_GuardPoint.x) && (m_Position.y == m_GuardPoint.y) && (m_Position.z == m_GuardPoint.z))
	{
		if(moved)
		{
			moved = false;
			SetCurrentSpeed(0);
		}
	}
}
Пример #2
0
void NPC::NextGuardPosition() {
	if (!CalculateNewPosition2(guard_x, guard_y, guard_z, GetMovespeed())) {
		SetHeading(guard_heading);
		mlog(AI__WAYPOINTS, "Unable to move to next guard position. Probably rooted.");
	}
	else if((x_pos == guard_x) && (y_pos == guard_y) && (z_pos == guard_z))
	{
		if(moved)
		{
			moved=false;
			SetMoving(false);
			SendPosition();
		}
	}
}