| 822 | } |
| 823 | |
| 824 | void World::InitLandscape(Landscape* landscape) |
| 825 | { |
| 826 | _preloadedVType[VTypeStatic] = NewAIType("Static"); |
| 827 | _preloadedVType[VTypeBuilding] = NewAIType("Building"); |
| 828 | _preloadedVType[VTypeStrategic] = NewAIType("Strategic"); |
| 829 | _preloadedVType[VTypeNonStrategic] = NewAIType("NonStrategic"); |
| 830 | _preloadedVType[VTypeTarget] = NewAIType("Target"); |
| 831 | _preloadedVType[VTypeAllVehicles] = NewAIType("AllVehicles"); |
| 832 | _preloadedVType[VTypeAir] = NewAIType("Air"); |
| 833 | _preloadedVType[VTypePlane] = NewAIType("Plane"); |
| 834 | _preloadedVType[VTypeShip] = NewAIType("Ship"); |
| 835 | _preloadedVType[VTypeBigShip] = NewAIType("BigShip"); |
| 836 | _preloadedVType[VTypeAPC] = NewAIType("APC"); |
| 837 | _preloadedVType[VTypeTank] = NewAIType("Tank"); |
| 838 | _preloadedVType[VTypeCar] = NewAIType("Car"); |
| 839 | _preloadedVType[VTypeMan] = NewAIType("Man"); |
| 840 | |
| 841 | Clear(); |
| 842 | |
| 843 | if (!ENGINE_CONFIG.landEditor || (Pars >> "CfgWorlds").FindEntry(Glob.header.worldname)) |
| 844 | { |
| 845 | const ParamEntry& world = Pars >> "CfgWorlds" >> Glob.header.worldname; |
| 846 | InitGeneral(world); |
| 847 | |
| 848 | ProgressRefresh(); |
| 849 | |
| 850 | const ParamEntry& ilsPos = world >> "ilsPosition"; |
| 851 | const ParamEntry& ilsDir = world >> "ilsDirection"; |
| 852 | Vector3 mainIlsPos; |
| 853 | Vector3 mainIlsDir; |
| 854 | mainIlsPos.Init(); |
| 855 | mainIlsDir.Init(); |
| 856 | mainIlsPos[0] = ilsPos[0]; |
| 857 | mainIlsPos[2] = ilsPos[1]; |
| 858 | mainIlsPos[1] = GLOB_LAND->SurfaceY(mainIlsPos[0], mainIlsPos[2]); |
| 859 | mainIlsDir[0] = ilsDir[0]; |
| 860 | mainIlsDir[1] = ilsDir[1]; |
| 861 | mainIlsDir[2] = ilsDir[2]; |
| 862 | mainIlsDir.Normalize(); |
| 863 | |
| 864 | _ilsPosWest = mainIlsPos; |
| 865 | _ilsDirWest = mainIlsDir; |
| 866 | |
| 867 | GetPosArray(_taxiInPathsWest, world >> "ilsTaxiIn"); |
| 868 | GetPosArray(_taxiOffPathsWest, world >> "ilsTaxiOff"); |
| 869 | } |
| 870 | |
| 871 | _scene.Init(_engine, landscape); |
| 872 | |
| 873 | ProgressRefresh(); |
| 874 | |
| 875 | if (!_ui && !ENGINE_CONFIG.doCreateDedicatedServer && !AppConfig::Instance().IsViewerMode()) |
| 876 | { |
| 877 | _ui = CreateInGameUI(); |
| 878 | } |
| 879 | |
| 880 | GScene = GetScene(); |
| 881 | GLandscape = _scene.GetLandscape(); |
no test coverage detected