Building Parts not delete when disallowed

When already building (simulswap) but building is disallowed, the building part will fall down instead of been deleted (without returning items)
This commit is contained in:
He-Man 2017-03-29 19:43:10 +02:00 committed by GitHub
parent b402cb3219
commit d3309926fa

View File

@ -101,14 +101,7 @@ if (isText(_simulClassConfig)) then {
_lastCheckTime = diag_tickTime;
_rejectMove = !(EPOCH_target call EPOCH_isBuildAllowed);
};
if (_rejectMove) exitWith{
// remove object and refund items
deleteVehicle EPOCH_target;
_removeParts = getArray(('CfgBaseBuilding' call EPOCH_returnConfig) >> _objType >> "removeParts");
{
[_x select 0,_x select 1] call EPOCH_fnc_addItemOverflow;
} forEach _removeParts;
};
if (_rejectMove) exitWith { EPOCH_target = objNull; };
_playerdistance = player distance EPOCH_target;
if (_playerdistance < 10) then {
_isSnap = false;