| 312 | void AIGlobalInit(); |
| 313 | |
| 314 | void World::InitEditor(Landscape* landscape, Entity* cursor) |
| 315 | { |
| 316 | _scene.Init(_engine, landscape); |
| 317 | |
| 318 | GScene = GetScene(); |
| 319 | GLandscape = _scene.GetLandscape(); |
| 320 | |
| 321 | InitGeneral(); |
| 322 | |
| 323 | InitFinish(); |
| 324 | _scene.GetLandscape()->InitObjectVehicles(); |
| 325 | |
| 326 | VehicleTypes.Preload(); |
| 327 | |
| 328 | EnvSoundPars[5].name = "SOUND\\$DEFAULT$.WSS"; |
| 329 | EnvSoundParsNight[5].name = "SOUND\\$DEFAULT$.WSS"; |
| 330 | |
| 331 | const char* ext = strrchr(LoadFile, '.'); |
| 332 | if (ext && QIFStreamB::FileExist(LoadFile)) |
| 333 | { |
| 334 | if (!strcmpi(ext, ".p3d")) |
| 335 | { |
| 336 | ReloadViewer(LoadFile, ""); |
| 337 | InitCameraPars(); |
| 338 | |
| 339 | GLOB_ENGINE->ReinitCounters(); |
| 340 | return; |
| 341 | } |
| 342 | else |
| 343 | { |
| 344 | SwitchLandscape(LoadFile); |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | { |
| 349 | Vector3 cPos(2525, 5, 2925); |
| 350 | cursor->SetPosition(cPos); |
| 351 | AddVehicle(cursor); |
| 352 | GetGameState()->VarSet("bis_buldozer_cursor", GameValueExt(cursor), true); |
| 353 | _cameraOn = cursor; |
| 354 | |
| 355 | InitCameraPars(); |
| 356 | _scene.GetLandscape()->InitGeography(); |
| 357 | } |
| 358 | |
| 359 | RString initScript = RString("scripts\\editor.sqs"); |
| 360 | if (QIFStreamB::FileExist(initScript)) |
| 361 | { |
| 362 | Script* script = new Script("editor.sqs", GameValue(), INT_MAX); |
| 363 | AddScript(script); |
| 364 | SimulateScripts(); |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | void World::InitCameraPars() |
| 369 | { |
nothing calls this directly
no test coverage detected