diff --git a/SQF/dayz_code/loot/spawn.sqf b/SQF/dayz_code/loot/spawn.sqf index 3032e1030..f1d357e64 100644 --- a/SQF/dayz_code/loot/spawn.sqf +++ b/SQF/dayz_code/loot/spawn.sqf @@ -3,7 +3,7 @@ Spawns the specified loot definition at the specified location. Parameters: array Loot definition - vector Spawn position relative to world + vector Loot position (AGL) Return value: object Spawned vehicle. @@ -54,7 +54,7 @@ switch (_lootInfo select 0) do Debug_Assert(typeName (_lootInfo select 1) == typeName "" && { (_lootInfo select 1) != "" }); //Debug_Log(String_Format2("DEBUG: Loot_Spawn Weapon: %1 Position: %2", _lootInfo select 1, _this select 1)); - _vehicle setPosATL (_this select 1); + _vehicle setPos (_this select 1); INCREMENT_WEAPON_HOLDERS(); _magazines = getArray (configFile >> "CfgWeapons" >> _lootInfo select 1 >> "magazines"); @@ -86,7 +86,7 @@ switch (_lootInfo select 0) do }; _vehicle = createVehicle ["WeaponHolder", _this select 1, [], 0, "CAN_COLLIDE"]; _vehicle addMagazineCargoGlobal [_item, 1]; - _vehicle setPosATL (_this select 1); + _vehicle setPos (_this select 1); INCREMENT_WEAPON_HOLDERS(); }; @@ -106,10 +106,10 @@ switch (_lootInfo select 0) do _p = Vector_SetZ(_p, Vector_Z(_p) + Vector_Z(getPosATL _vehicle)); _vehicle setVectorDirAndUp [Vector_DOWN, _d]; - _vehicle setPosATL _p; + _vehicle setPos _p; #else _vehicle = createVehicle [_lootInfo select 1, _this select 1, [], 0, "CAN_COLLIDE"]; - _vehicle setPosATL (_this select 1); + _vehicle setPos (_this select 1); #endif }; @@ -119,7 +119,7 @@ switch (_lootInfo select 0) do _spawnCount = (_lootInfo select 2) + floor random ((_lootInfo select 3) - (_lootInfo select 2) + 1); _vehicle = createVehicle ["WeaponHolder", _this select 1, [], 0, "CAN_COLLIDE"]; Loot_InsertCargo(_vehicle, _lootInfo select 1, _spawnCount); - _vehicle setPosATL (_this select 1); + _vehicle setPos (_this select 1); INCREMENT_WEAPON_HOLDERS(); }; @@ -128,7 +128,7 @@ switch (_lootInfo select 0) do { _vehicle = createVehicle [_lootInfo select 1, _this select 1, [], 0, "CAN_COLLIDE"]; _vehicle setDir random 360; - _vehicle setPosATL (_this select 1); + _vehicle setPos (_this select 1); }; //Spawn a container and populate it with loot from a given group @@ -143,7 +143,7 @@ switch (_lootInfo select 0) do Loot_InsertCargo(_vehicle, _lootInfo select 2, _spawnCount); _vehicle setDir random 360; - _vehicle setPosATL (_this select 1); + _vehicle setPos (_this select 1); }; //Call a function which is assumed to return an object reference. @@ -151,7 +151,7 @@ switch (_lootInfo select 0) do { _vehicle = call (_lootInfo select 1); if ((typeName _vehicle) != "OBJECT") exitWith {}; - if (!isNull _vehicle) then { _vehicle setPosATL (_this select 1); }; + if (!isNull _vehicle) then { _vehicle setPos (_this select 1); }; }; };