Weird symbols removed (no changes)

This commit is contained in:
He-Man 2019-06-08 20:29:37 +02:00
parent 1759983d93
commit 6631fac337

View File

@ -1,383 +1,410 @@
if (isnil "LootMarkersPositions" && isnil "LootMarkers") then { if (isnil "LootMarkersPositions" && isnil "LootMarkers") then {
_Skipbuildings = [ _Skipbuildings = [
"Land_Mil_Barracks_L", "Land_Mil_Barracks_L",
"Land_Mil_Guardhouse", "Land_Mil_Guardhouse",
"Land_Mil_ControlTower_ruins", "Land_Mil_ControlTower_ruins",
"Land_Mil_ControlTower", "Land_Mil_ControlTower",
"Land_Mil_Barracks", "Land_Mil_Barracks",
"Land_Mil_House", "Land_Mil_House",
"Land_SS_hangar", "Land_SS_hangar",
"Land_a_stationhouse", "Land_a_stationhouse",
"Land_Misc_WaterStation", "Land_Misc_WaterStation",
"Land_HouseV_3I4", "Land_HouseV_3I4",
"Land_HouseV_3I3", "Land_HouseV_3I3",
"Land_HouseV_3I2", "Land_HouseV_3I2",
"Land_HouseV_3I1", "Land_HouseV_3I1",
"Land_HouseV_2T2", "Land_HouseV_2T2",
"Land_HouseV_2T1", "Land_HouseV_2T1",
"Land_HouseV_2L", "Land_HouseV_2L",
"Land_HouseV_2I", "Land_HouseV_2I",
"Land_HouseV_1t", "Land_HouseV_1t",
"Land_HouseV_1L2", "Land_HouseV_1L2",
"Land_StoneWell_01_F", "Land_FeedRack_01_F", "Land_HighVoltageTower_largeCorner_F", "Land_HighVoltageTower_large_F", "Land_Hutch_01_F", "Land_Communication_F", "Land_ChickenCoop_01_F", "Land_MysteriousBell_01_F", "Land_Calvary_03_F", "Land_Chapel_02_white_ruins_F", "Land_Sawmill_01_illuminati_tower_F", "Land_DryToilet_01_F", "Land_House_2B02_ruins_F", "Land_House_1W08_ruins_F", "Land_FuelStation_Shed_F", "Land_FuelStation_Feed_F", "Land_Greenhouse_01_damaged_F", "Land_Slums02_4m", "Land_StoneWell_01_F",
"Land_Metal_Shed_ruins_F", "Land_FeedShack_01_F", "Land_TBox_ruins_F", "Land_Slum_House03_ruins_F", "Land_Smokestack_03_ruins_F", "Land_Slum_House02_ruins_F", "Land_TTowerSmall_2_F", "Land_Chapel_02_yellow_ruins_F", "Land_Radar_01_antenna_F", "Land_FeedStorage_01_F", "Land_House_1W04_ruins_F" "Land_FeedRack_01_F",
]; "Land_HighVoltageTower_largeCorner_F",
_skipstrings = [ "Land_HighVoltageTower_large_F",
"land_containerline", "Land_Hutch_01_F",
"land_telephoneline", "Land_Communication_F",
"land_power_pole", "Land_ChickenCoop_01_F",
"land_netfence", "Land_MysteriousBell_01_F",
"land_woodenwall", "Land_Calvary_03_F",
"land_brickwall", "Land_Chapel_02_white_ruins_F",
"land_grave", "Land_Sawmill_01_illuminati_tower_F",
"sign", "Land_DryToilet_01_F",
"powerline", "Land_House_2B02_ruins_F",
"stairs", "Land_House_1W08_ruins_F",
"protection", "Land_FuelStation_Shed_F",
"invisible", "Land_FuelStation_Feed_F",
"concrete", "Land_Greenhouse_01_damaged_F",
"light", "Land_Slums02_4m",
"lamp", "Land_Metal_Shed_ruins_F",
"runway", "Land_FeedShack_01_F",
"pier", "Land_TBox_ruins_F",
"pipe", "Land_Slum_House03_ruins_F",
"cargo", "Land_Smokestack_03_ruins_F",
"bridge", "Land_Slum_House02_ruins_F",
"boat", "Land_TTowerSmall_2_F",
"castle", "Land_Chapel_02_yellow_ruins_F",
"mirror", "Land_Radar_01_antenna_F",
"gate", "Land_FeedStorage_01_F",
"wreck", "Land_House_1W04_ruins_F"
"powerlines", ];
"tank", _skipstrings = [
"plot", "land_containerline",
"garbage", "land_telephoneline",
"wired", "land_power_pole",
"barrier", "land_netfence",
"bagfence", "land_woodenwall",
"luggage", "land_brickwall",
"helipad" "land_grave",
]; "sign",
LootMarkersPositions = []; "powerline",
LootMarkers = []; "stairs",
if (isnil 'LootArray') then {LootArray = []}; "protection",
_allbuildingtypes = []; "invisible",
_allmapbuildings = nearestobjects [player,['building'],40000]; "concrete",
_masterConfig = (missionConfigFile >> "CfgBuildingLootPos"); "light",
_c = 1; "lamp",
{ "runway",
_building = _x; "pier",
if !(typeof _building in _Skipbuildings) then { "pipe",
if !(typeof _building in _allbuildingtypes) then { "cargo",
if ({typeof _building == (_x select 0)} count LootArray == 0) then { "bridge",
_config = _masterConfig >> (typeOf _building); "boat",
if !(isClass(_config)) then { "castle",
_skip = false; "mirror",
{ "gate",
if (tolower (typeOf _building) find _x > -1) exitwith { "wreck",
_skip = true; "powerlines",
}; "tank",
} foreach _skipstrings; "plot",
if !(_skip) then { "garbage",
_allbuildingtypes pushback (typeof _building); "wired",
_marker = createMarker [typeof _building, (getpos _building)]; "barrier",
_marker setmarkertype "mil_dot"; "bagfence",
_marker setMarkerColor 'ColorRed'; "luggage",
_marker setMarkerText (typeof _building); "helipad"
LootMarkersPositions pushback (getpos _building); ];
LootMarkers pushback (typeof _building); LootMarkersPositions = [];
_c = _c+1; LootMarkers = [];
}; if (isnil 'LootArray') then {LootArray = []};
}; _allbuildingtypes = [];
}; _allmapbuildings = nearestobjects [player,['building'],40000];
}; _masterConfig = (missionConfigFile >> "CfgBuildingLootPos");
}; _c = 1;
} foreach _allmapbuildings; {
publicvariable "LootMarkersPositions"; _building = _x;
publicvariable "LootMarkers"; if !(typeof _building in _Skipbuildings) then {
}; if !(typeof _building in _allbuildingtypes) then {
if ({typeof _building == (_x select 0)} count LootArray == 0) then {
_config = _masterConfig >> (typeOf _building);
Itemarray = ["toilet_epoch","Shelf_EPOCH","Fridge_EPOCH","Bunk_EPOCH","Couch_EPOCH","wardrobe_epoch","cooker_epoch","ChairRed_EPOCH","Filing_epoch","Pelican_EPOCH","Table_EPOCH","Locker_EPOCH","ToolRack_EPOCH","Shoebox_EPOCH","Tarp_EPOCH","Freezer_EPOCH","Cabinet_EPOCH","KitchenSink_epoch"]; if !(isClass(_config)) then {
Skipbuildings = ["Land_Mil_Barracks_L","Land_Mil_Guardhouse","Land_Mil_ControlTower_ruins","Land_Mil_ControlTower","Land_Mil_Barracks","Land_Mil_House","Land_SS_hangar","Land_a_stationhouse","Land_Misc_WaterStation","Land_HouseV_3I4","Land_HouseV_3I3","Land_HouseV_3I2","Land_HouseV_3I1","Land_HouseV_2T2","Land_HouseV_2T1","Land_HouseV_2L","Land_HouseV_2I","Land_HouseV_1t","Land_HouseV_1L2"]; _skip = false;
ItemArrayCount = count Itemarray; {
SkippedBuildings = []; if (tolower (typeOf _building) find _x > -1) exitwith {
Item = objNull; _skip = true;
Building = ObjNull; };
SelectedItem = 0; } foreach _skipstrings;
if (isnil 'LootArray') then {LootArray = []}; if !(_skip) then {
player allowdamage false; _allbuildingtypes pushback (typeof _building);
_marker = createMarker [typeof _building, (getpos _building)];
(findDisplay 12 displayCtrl 51) ctrlAddEventHandler ['MouseButtonDown',{ _marker setmarkertype "mil_dot";
params ["_displayorcontrol", "_button", "_xPos", "_yPos", "_shift", "_ctrl", "_alt"]; _marker setMarkerColor 'ColorRed';
if (_ctrl) then { _marker setMarkerText (typeof _building);
params ["","",""]; LootMarkersPositions pushback (getpos _building);
_pos = (_displayorcontrol posScreenToWorld [_xPos, _yPos]); LootMarkers pushback (typeof _building);
vehicle player setPosATL _pos; _c = _c+1;
}; };
}]; };
(findDisplay 12 displayCtrl 51) ctrlAddEventHandler['Draw',{ };
params ["_control"]; };
_veh = vehicle player; };
_type = typeOf _veh; } foreach _allmapbuildings;
_icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon'); publicvariable "LootMarkersPositions";
_clr = [0,0,1,1]; publicvariable "LootMarkers";
_txt = (name player); };
_control drawIcon [
_icon,
_clr, Itemarray = ["toilet_epoch","Shelf_EPOCH","Fridge_EPOCH","Bunk_EPOCH","Couch_EPOCH","wardrobe_epoch","cooker_epoch","ChairRed_EPOCH","Filing_epoch","Pelican_EPOCH","Table_EPOCH","Locker_EPOCH","ToolRack_EPOCH","Shoebox_EPOCH","Tarp_EPOCH","Freezer_EPOCH","Cabinet_EPOCH","KitchenSink_epoch"];
getPosASL _veh, Skipbuildings = ["Land_Mil_Barracks_L","Land_Mil_Guardhouse","Land_Mil_ControlTower_ruins","Land_Mil_ControlTower","Land_Mil_Barracks","Land_Mil_House","Land_SS_hangar","Land_a_stationhouse","Land_Misc_WaterStation","Land_HouseV_3I4","Land_HouseV_3I3","Land_HouseV_3I2","Land_HouseV_3I1","Land_HouseV_2T2","Land_HouseV_2T1","Land_HouseV_2L","Land_HouseV_2I","Land_HouseV_1t","Land_HouseV_1L2"];
((1 - ctrlMapScale _control) max .2) * 28, ItemArrayCount = count Itemarray;
((1 - ctrlMapScale _control) max .2) * 28, SkippedBuildings = [];
getdir _veh, Item = objNull;
_txt Building = ObjNull;
]; SelectedItem = 0;
}]; if (isnil 'LootArray') then {LootArray = []};
(findDisplay 46) displayAddEventHandler ["KeyDown", player allowdamage false;
{
params ["_ctrl", "_dikCode", "_shift", "_ctrlKey", "_alt"]; (findDisplay 12 displayCtrl 51) ctrlAddEventHandler ['MouseButtonDown',{
_handled = false; params ["_displayorcontrol", "_button", "_xPos", "_yPos", "_shift", "_ctrl", "_alt"];
_stepspeed = if (_ctrlKey) then {0.15} else {0.05}; if (_ctrl) then {
_dirspeed = if (_ctrlKey) then {1.5} else {0.5}; params ["","",""];
switch _dikCode do { _pos = (_displayorcontrol posScreenToWorld [_xPos, _yPos]);
case 0x1C: { vehicle player setPosATL _pos;
if (cursorobject iskindof 'building') then { };
Building = cursorobject; }];
} (findDisplay 12 displayCtrl 51) ctrlAddEventHandler['Draw',{
else { params ["_control"];
Building = nearestbuilding player; _veh = vehicle player;
}; _type = typeOf _veh;
if (isClass(missionConfigFile >> "CfgBuildingLootPos" >> (typeof cursorobject)) || (typeof Building) in Skipbuildings) then { _icon = getText(configFile >> 'CfgVehicles' >> _type >> 'icon');
systemchat format ['WARNING !!! %1 is already in LootList!!!',typeof Building]; _clr = [0,0,1,1];
hint format ['WARNING !!! %1 is already in LootList!!!',typeof Building]; _txt = (name player);
Building = ObjNull; _control drawIcon [
} _icon,
else { _clr,
systemchat format ['Selected Building = %1',typeof Building]; getPosASL _veh,
hint format ['Selected Building = %1',typeof Building]; ((1 - ctrlMapScale _control) max .2) * 28,
}; ((1 - ctrlMapScale _control) max .2) * 28,
}; getdir _veh,
case 0x4B: { _txt
if (!isNull Item) then { ];
_oldPos = getposasl Item; }];
_newpos = (getposasl Item) getPos [_stepspeed,(getdir player)-90]; (findDisplay 46) displayAddEventHandler ["KeyDown",
_newpos set [2,_oldPos select 2]; {
Item setposasl _newpos; params ["_ctrl", "_dikCode", "_shift", "_ctrlKey", "_alt"];
_handled = true; _handled = false;
}; _stepspeed = if (_ctrlKey) then {0.15} else {0.05};
}; _dirspeed = if (_ctrlKey) then {1.5} else {0.5};
case 0x4D: { switch _dikCode do {
if (!isNull Item) then { case 0x1C: {
_oldPos = getposasl Item; if (cursorobject iskindof 'building') then {
_newpos = (getposasl Item) getPos [_stepspeed,(getdir player)+90]; Building = cursorobject;
_newpos set [2,_oldPos select 2]; }
Item setposasl _newpos; else {
_handled = true; Building = nearestbuilding player;
}; };
}; if (isClass(missionConfigFile >> "CfgBuildingLootPos" >> (typeof cursorobject)) || (typeof Building) in Skipbuildings) then {
case 0x48: { systemchat format ['WARNING !!! %1 is already in LootList!!!',typeof Building];
if (!isNull Item) then { hint format ['WARNING !!! %1 is already in LootList!!!',typeof Building];
_oldPos = getposasl Item; Building = ObjNull;
_newpos = (getposasl Item) getPos [_stepspeed,(getdir player)]; }
_newpos set [2,_oldPos select 2]; else {
Item setposasl _newpos; systemchat format ['Selected Building = %1',typeof Building];
_handled = true; hint format ['Selected Building = %1',typeof Building];
}; };
}; };
case 0x50: { case 0x4B: {
if (!isNull Item) then { if (!isNull Item) then {
_oldPos = getposasl Item; _oldPos = getposasl Item;
_newpos = (getposasl Item) getPos [_stepspeed,(getdir player)+180]; _newpos = (getposasl Item) getPos [_stepspeed,(getdir player)-90];
_newpos set [2,_oldPos select 2]; _newpos set [2,_oldPos select 2];
Item setposasl _newpos; Item setposasl _newpos;
_handled = true; _handled = true;
}; };
}; };
case 0xC7: { case 0x4D: {
SelectedItem = ((SelectedItem + 1) min (ItemArrayCount-1)) max 0; if (!isNull Item) then {
if !(isNull Item) then { _oldPos = getposasl Item;
deletevehicle Item; _newpos = (getposasl Item) getPos [_stepspeed,(getdir player)+90];
}; _newpos set [2,_oldPos select 2];
_pos = player modeltoworld [0,5,0]; Item setposasl _newpos;
_selectedClass = Itemarray select SelectedItem; _handled = true;
Item = createVehicle [_selectedClass, _pos, [], 0, "CAN_COLLIDE"]; };
Item setvectorup [0,0,1]; };
if (surfaceiswater _pos) then { case 0x48: {
Item setposasl _pos; if (!isNull Item) then {
}; _oldPos = getposasl Item;
}; _newpos = (getposasl Item) getPos [_stepspeed,(getdir player)];
case 0xCF: { _newpos set [2,_oldPos select 2];
SelectedItem = ((SelectedItem - 1) min (ItemArrayCount-1)) max 0; Item setposasl _newpos;
if !(isNull Item) then { _handled = true;
deletevehicle Item; };
}; };
_pos = player modeltoworld [0,5,0]; case 0x50: {
_selectedClass = Itemarray select SelectedItem; if (!isNull Item) then {
Item = createVehicle [_selectedClass, _pos, [], 0, "CAN_COLLIDE"]; _oldPos = getposasl Item;
Item setvectorup [0,0,1]; _newpos = (getposasl Item) getPos [_stepspeed,(getdir player)+180];
if (surfaceiswater _pos) then { _newpos set [2,_oldPos select 2];
Item setposasl _pos; Item setposasl _newpos;
}; _handled = true;
}; };
case 0xC9: { };
if (!isNull Item) then { case 0xC7: {
_newpos = getposasl Item; SelectedItem = ((SelectedItem + 1) min (ItemArrayCount-1)) max 0;
_newpos set [2,((getposasl Item) select 2)+_stepspeed]; if !(isNull Item) then {
Item setposasl _newpos; deletevehicle Item;
_handled = true; };
}; _pos = player modeltoworld [0,5,0];
}; _selectedClass = Itemarray select SelectedItem;
case 0xD1: { Item = createVehicle [_selectedClass, _pos, [], 0, "CAN_COLLIDE"];
Item setvectorup [0,0,1];
if (!isNull Item) then { if (surfaceiswater _pos) then {
_newpos = getposasl Item; Item setposasl _pos;
_newpos set [2,((getposasl Item) select 2)-_stepspeed]; };
Item setposasl _newpos; };
_handled = true; case 0xCF: {
}; SelectedItem = ((SelectedItem - 1) min (ItemArrayCount-1)) max 0;
}; if !(isNull Item) then {
case 0x47: { deletevehicle Item;
if (!isNull Item) then { };
_dir = getdir Item; _pos = player modeltoworld [0,5,0];
_newdir = _dir - _dirspeed; _selectedClass = Itemarray select SelectedItem;
Item setdir _newdir; Item = createVehicle [_selectedClass, _pos, [], 0, "CAN_COLLIDE"];
_handled = true; Item setvectorup [0,0,1];
}; if (surfaceiswater _pos) then {
}; Item setposasl _pos;
case 0x49: { };
if (!isNull Item) then { };
_dir = getdir Item; case 0xC9: {
_newdir = _dir + _dirspeed; if (!isNull Item) then {
Item setdir _newdir; _newpos = getposasl Item;
_handled = true; _newpos set [2,((getposasl Item) select 2)+_stepspeed];
}; Item setposasl _newpos;
}; _handled = true;
case 0x39: { };
if (!isNull Item && !isnull Building) then { };
if !(Building distance Item > 80) then { case 0xD1: {
_c = 0;
_found = false; if (!isNull Item) then {
{ _newpos = getposasl Item;
if (typeof Building == (_x select 0)) exitwith {_found = true;}; _newpos set [2,((getposasl Item) select 2)-_stepspeed];
_c = _c+1; Item setposasl _newpos;
} foreach Lootarray; _handled = true;
if (_found) then { };
};
_Buildingarray = Lootarray select _c; case 0x47: {
_allitemsarray = _Buildingarray select 1; if (!isNull Item) then {
_d = 0; _dir = getdir Item;
_found2 = false; _newdir = _dir - _dirspeed;
{ Item setdir _newdir;
if (typeof Item == (_x select 0)) exitwith {_found2 = true}; _handled = true;
_d = _d+1; };
} foreach _allitemsarray; };
if (_found2) then { case 0x49: {
_Itemarray = _allitemsarray select _d; if (!isNull Item) then {
_Itemsposarray = _Itemarray select 1; _dir = getdir Item;
_Itemsposarray pushback [Building worldToModel (getposatl Item),getdir Item - getdir Building]; _newdir = _dir + _dirspeed;
} Item setdir _newdir;
else { _handled = true;
_allitemsarray pushback [typeof Item,[[Building worldToModel (getposatl Item),getdir Item - getdir Building]]]; };
}; };
} case 0x39: {
else { if (!isNull Item && !isnull Building) then {
Lootarray pushback [typeof Building, [[typeof Item,[[Building worldToModel (getposatl Item),getdir Item - getdir Building]]]]]; if !(Building distance Item > 80) then {
_idx = LootMarkers find (typeof Building); _c = 0;
if (_idx > -1) then { _found = false;
LootMarkers deleteat _idx; {
LootMarkersPositions deleteat _idx; if (typeof Building == (_x select 0)) exitwith {_found = true;};
publicvariable "LootMarkersPositions"; _c = _c+1;
publicvariable "LootMarkers"; } foreach Lootarray;
}; if (_found) then {
deleteMarker (typeof Building);
}; _Buildingarray = Lootarray select _c;
systemchat format ['saved %1 position to %2',typeof Item, typeof Building]; _allitemsarray = _Buildingarray select 1;
hint format ['saved %1 position to %2',typeof Item, typeof Building]; _d = 0;
{diag_log str (lootarray select _foreachindex)}foreach lootarray; _found2 = false;
publicvariable 'lootarray'; {
Item = ObjNull; if (typeof Item == (_x select 0)) exitwith {_found2 = true};
} _d = _d+1;
else { } foreach _allitemsarray;
systemchat format ['WARNING, the Item is to far away from the Building! - not safed!']; if (_found2) then {
hint format ['WARNING, the Item is to far away from the Building! - not saved!']; _Itemarray = _allitemsarray select _d;
}; _Itemsposarray = _Itemarray select 1;
_handled = true; _Itemsposarray pushback [Building worldToModel (getposatl Item),getdir Item - getdir Building];
} }
else { else {
if (isnull Building) exitwith { _allitemsarray pushback [typeof Item,[[Building worldToModel (getposatl Item),getdir Item - getdir Building]]];
systemchat format ['Select a Building first!']; };
hint format ['Select a Building first!']; }
}; else {
if (isnull Item) exitwith { Lootarray pushback [typeof Building, [[typeof Item,[[Building worldToModel (getposatl Item),getdir Item - getdir Building]]]]];
systemchat format ['Place a Loot-Item first!']; _idx = LootMarkers find (typeof Building);
hint format ['Place a Loot-Item first!']; if (_idx > -1) then {
}; LootMarkers deleteat _idx;
}; LootMarkersPositions deleteat _idx;
}; publicvariable "LootMarkersPositions";
case 1: { publicvariable "LootMarkers";
if (!isNull Item) then { };
deletevehicle Item; deleteMarker (typeof Building);
Item = ObjNull; };
_handled = true; systemchat format ['saved %1 position to %2',typeof Item, typeof Building];
}; hint format ['saved %1 position to %2',typeof Item, typeof Building];
}; {diag_log str (lootarray select _foreachindex)}foreach lootarray;
case 0x57: { publicvariable 'lootarray';
if (count LootMarkersPositions > 0) then { Item = ObjNull;
_idx = round (random ((count LootMarkersPositions)-1)); }
systemchat format ["Index = %1",_idx]; else {
player setpos (LootMarkersPositions select _idx); systemchat format ['WARNING, the Item is to far away from the Building! - not safed!'];
Building = nearestObject [player, LootMarkers select _idx]; hint format ['WARNING, the Item is to far away from the Building! - not saved!'];
systemchat format ['Selected Building = %1',typeof Building]; };
hint format ['Selected Building = %1',typeof Building]; _handled = true;
} }
else { else {
hint "No more positions found!"; if (isnull Building) exitwith {
}; systemchat format ['Select a Building first!'];
}; hint format ['Select a Building first!'];
case 0x43: { };
if (isnull Building) exitwith { if (isnull Item) exitwith {
hint "No Building selected to remove from List"; systemchat format ['Place a Loot-Item first!'];
}; hint format ['Place a Loot-Item first!'];
if (Building distance2D player > 20) exitwith { };
};
hint "Building too far away to remove from List"; };
}; case 1: {
_idx = LootMarkers find (typeof Building); if (!isNull Item) then {
if (_idx > -1) then { deletevehicle Item;
LootMarkers deleteat _idx; Item = ObjNull;
LootMarkersPositions deleteat _idx; _handled = true;
publicvariable "LootMarkersPositions"; };
publicvariable "LootMarkers"; };
}; case 0x57: {
deleteMarker (typeof Building); if (count LootMarkersPositions > 0) then {
SkippedBuildings pushback (typeof Building); _idx = round (random ((count LootMarkersPositions)-1));
publicvariable "SkippedBuildings"; systemchat format ["Index = %1",_idx];
Building = objnull; player setpos (LootMarkersPositions select _idx);
hint "Building removed from list without defining lootpositions"; Building = nearestObject [player, LootMarkers select _idx];
}; systemchat format ['Selected Building = %1',typeof Building];
case 0x06: { hint format ['Selected Building = %1',typeof Building];
_plr = vehicle player; }
_dir = getdir _plr; else {
_dist = 10; hint "No more positions found!";
if (surfaceIsWater position _plr) then { };
_pos = getPosASL _plr; };
_pos = [(_pos select 0)+_dist*sin(_dir),(_pos select 1)+_dist*cos(_dir),(_pos select 2)]; case 0x43: {
_plr setPosASL _pos; if (isnull Building) exitwith {
} hint "No Building selected to remove from List";
else { };
_pos = getPosATL _plr; if (Building distance2D player > 20) exitwith {
_pos = [(_pos select 0)+_dist*sin(_dir),(_pos select 1)+_dist*cos(_dir),(_pos select 2)];
_plr setPosATL _pos; hint "Building too far away to remove from List";
}; };
player setdamage 0; _idx = LootMarkers find (typeof Building);
}; if (_idx > -1) then {
case 0x05: { LootMarkers deleteat _idx;
player allowdamage false; LootMarkersPositions deleteat _idx;
_vel = velocity player; publicvariable "LootMarkersPositions";
player setVelocity [(_vel select 0),(_vel select 1),8]; publicvariable "LootMarkers";
player setdamage 0; };
}; deleteMarker (typeof Building);
}; SkippedBuildings pushback (typeof Building);
_handled publicvariable "SkippedBuildings";
} Building = objnull;
]; hint "Building removed from list without defining lootpositions";
};
case 0x06: {
_plr = vehicle player;
_dir = getdir _plr;
_dist = 10;
if (surfaceIsWater position _plr) then {
_pos = getPosASL _plr;
_pos = [(_pos select 0)+_dist*sin(_dir),(_pos select 1)+_dist*cos(_dir),(_pos select 2)];
_plr setPosASL _pos;
}
else {
_pos = getPosATL _plr;
_pos = [(_pos select 0)+_dist*sin(_dir),(_pos select 1)+_dist*cos(_dir),(_pos select 2)];
_plr setPosATL _pos;
};
player setdamage 0;
};
case 0x05: {
player allowdamage false;
_vel = velocity player;
player setVelocity [(_vel select 0),(_vel select 1),8];
player setdamage 0;
};
};
_handled
}
];