| 1676 | LOG_DEBUG(AI, "pos {:.2f},{:.2f},{:.2f}", pos[0], pos[1], pos[2]); |
| 1677 | LOG_DEBUG(AI, "from {:.2f},{:.2f},{:.2f}", from[0], from[1], from[2]); |
| 1678 | } |
| 1679 | map.CreateMap(GetVehicle(), xMin, zMin, xMax, zMax); |
| 1680 | bool retVal = map.IsSimplePath(this, xs, zs, xe, ze); |
| 1681 | |
| 1682 | GetVehicle()->PerformLock(); |
| 1683 | return retVal; |
| 1684 | } |
| 1685 | |
| 1686 | bool AIUnit::VerifyPath() |
| 1687 | { |
| 1688 | // do not verify fresh path |
| 1689 | if (_path.GetSearchTime() > Glob.time - 0.5) |
| 1690 | { |
| 1691 | // assume fresh path is always valid |
| 1692 | return true; |
| 1693 | } |
| 1694 | |
| 1695 | EntityAI* veh = GetVehicle(); |
| 1696 | if (_path.GetOnRoad()) |
| 1697 | { |
| 1698 | veh->PerformUnlock(); |
| 1699 | int index = _path.GetOperIndex(); |
| 1700 | for (int i = index; i < _path.GetMaxIndex(); i++) |
| 1701 | { |
| 1702 | if (GRoadNet->IsLocked(_path[i]._pos, 0.1)) |
| 1703 | { |
| 1704 | return false; |
| 1705 | } |
| 1706 | } |
| 1707 | veh->PerformLock(); |
| 1708 | } |
| 1709 | else |
nothing calls this directly
no test coverage detected