diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf index 8e90e520..8bf6de38 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf @@ -163,8 +163,16 @@ if (_vehSlot != -1 || _storageSlot != "ABORT" || _isTemporary == 1) then{ [_building, _player] call EPOCH_server_save_killedBuilding; deleteVehicle _building; }; - // 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]; } forEach _removeParts;