atlas_manager.sqf 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //DooDziO 18.17 add ship
  2. if ( GRLIB_USS_FREEDOM ) then {
  3. if ( isServer ) then {
  4. lhd setpos getmarkerpos "USS_FREEDOM";
  5. lhd hideObject true;
  6. { deleteVehicle _x } foreach ( ( getmarkerpos "base_chimera" ) nearObjects 500 );
  7. { deleteVehicle _x } foreach ( ( getmarkerpos "lhd" ) nearObjects 500 );
  8. GRLIB_isAtlasPresent = false;
  9. publicVariable "GRLIB_isAtlasPresent"
  10. }else{
  11. //client wait for server to complete. Then remove local markers of bases
  12. waitUntil { !isNil "GRLIB_isAtlasPresent" };
  13. };
  14. deleteMarkerLocal "lhd";
  15. deleteMarkerLocal "base_chimera";
  16. } else {
  17. //no ship
  18. if ( isServer ) then {
  19. //no ship so remove ship
  20. { deleteVehicle _x } foreach ( ( getmarkerpos "USS_FREEDOM" ) nearObjects 500 );
  21. _isAtlas = isClass ( configFile / "cfgVehicles" / "ATLAS_B_LHD_helper" );
  22. if ( _isAtlas ) then {
  23. [ lhd, [ 'ATLAS_LHD_1','ATLAS_LHD_2','ATLAS_LHD_3','ATLAS_LHD_4','ATLAS_LHD_5','ATLAS_LHD_5a',
  24. 'ATLAS_LHD_6','ATLAS_LHD_7','ATLAS_LHD_house_1','ATLAS_LHD_house_2','ATLAS_LHD_elev_1',
  25. 'ATLAS_LHD_elev_2','ATLAS_LHD_Light2','ATLAS_LHD_Int_1','ATLAS_LHD_Int_2','ATLAS_LHD_Int_3' ] ]
  26. execVM "ATLAS_Water\scripts\large_object_attach.sqf";
  27. [ lhd ] execVM "ATLAS_WAter\LHD\scripts\initlights.sqf";
  28. lhd hideObject true;
  29. { deleteVehicle _x } foreach ( ( getmarkerpos "base_chimera" ) nearObjects 500 );
  30. GRLIB_isAtlasPresent = true; publicVariable "GRLIB_isAtlasPresent";
  31. } else {
  32. lhd setpos getmarkerpos "base_chimera";
  33. lhd hideObject true;
  34. { deleteVehicle _x } foreach ( ( getmarkerpos "lhd" ) nearObjects 500 );
  35. GRLIB_isAtlasPresent = false; publicVariable "GRLIB_isAtlasPresent";
  36. };
  37. } else {
  38. waitUntil { !isNil "GRLIB_isAtlasPresent" };
  39. };
  40. //remove marker
  41. deleteMarkerLocal "USS_FREEDOM";
  42. if ( GRLIB_isAtlasPresent ) then {
  43. deleteMarkerLocal "base_chimera";
  44. } else {
  45. deleteMarkerLocal "lhd";
  46. };
  47. };