Merge pull request #613 from 82ndab-Bravo17/BuildingItems

Fix for building parts not being returnrd on removal
This commit is contained in:
vbawol 2016-10-18 00:01:33 -05:00 committed by GitHub
commit 7c1e18d6aa

View File

@ -163,8 +163,16 @@ if (_vehSlot != -1 || _storageSlot != "ABORT" || _isTemporary == 1) then{
[_building, _player] call EPOCH_server_save_killedBuilding; [_building, _player] call EPOCH_server_save_killedBuilding;
deleteVehicle _building; deleteVehicle _building;
}; };
// Normal config based payout // Normal config based payout
_nearbyWH = nearestObjects[_posWH, ["groundWeaponHolder"], 2];
if !(_nearbyWH isEqualTo[]) then{
_gwh = _nearbyWH select 0;
// _posWH = getPosATL _gwh;
} else {
_gwh = createVehicle["groundWeaponHolder", [0,0,0], [], 0, "CAN_COLLIDE"];
_gwh setPosATL _posWH;
};
{ {
_gwh addMagazineCargoGlobal[_x select 0, _x select 1]; _gwh addMagazineCargoGlobal[_x select 0, _x select 1];
} forEach _removeParts; } forEach _removeParts;