| 1891 | return CreateNoRoadPath(from, to, fromBuilding, toBuilding); |
| 1892 | } |
| 1893 | } |
| 1894 | if (!GetVehicle()->IsCautious() && CreateRoadPath(from, to)) |
| 1895 | { |
| 1896 | return true; |
| 1897 | } |
| 1898 | return CreateNoRoadPath(from, to); |
| 1899 | } |
| 1900 | |
| 1901 | bool AIUnit::CheckEmpty(Vector3Par pos) |
| 1902 | { |
| 1903 | EntityAI* veh = GetVehicle(); |
| 1904 | veh->PerformUnlock(); |
| 1905 | |
| 1906 | float xEnd = pos.X(); |
| 1907 | float zEnd = pos.Z(); |
| 1908 | int xe = toIntFloor(xEnd * InvOperItemGrid); |
| 1909 | int ze = toIntFloor(zEnd * InvOperItemGrid); |
| 1910 | |
| 1911 | int xei = xe / OperItemRange; |
| 1912 | int zei = ze / OperItemRange; |
| 1913 | |
| 1914 | const int border = 0; |
| 1915 | |
| 1916 | OperMap map; |
| 1917 | map.CreateMap(veh, xei - border, zei - border, xei + border, zei + border); |
no test coverage detected