Fix remove object option

This commit is contained in:
icomrade
2016-04-29 20:48:16 -04:00
parent 6fa3365b70
commit b5c2c6c7bd
2 changed files with 4 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
private ["_plant","_originalCount","_xx_leaf","_mags","_weps","_item","_magcounts","_forEachIndex","_wepcounts","_dis","_sfx"];
private ["_plant","_originalCount"];
_plant = _this;
@@ -8,6 +8,7 @@ if !([ [[["equip_comfreyleafs"],[_originalCount]],[[],[]]] , [getMagazineCargo _
//diag_log [ [getMagazineCargo _plant, getWeaponCargo _plant], "!=", [[["equip_comfreyleafs"],[_originalCount]],[[],[]]] ];
_plant setVariable["Gathering",true]; // avoid multiple call because the fn_selfActions is called in an infinite loop
[_this] spawn { // in background to be called after fn_selfActions
private ["_mags","_weps","_item","_magcounts","_wepcounts","_dis","_sfx"];
_plant = _this select 0;
_mags = (getMagazineCargo _plant) select 0;
_weps = (getWeaponCargo _plant) select 0;

View File

@@ -5,7 +5,7 @@ scriptName "Functions\misc\fn_selfActions.sqf";
- [] call fnc_usec_selfActions;
************************************************************/
if (DZE_ActionInProgress) exitWith {};
private ["_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasRawMeat","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isFuel","_isAlive","_unlock","_lock","_buy","_dogHandle","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_traderMenu","_humanity","_speed","_dog","_hasbottleitem","_findNearestGen","_cursorTarget","_itemsPlayer","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_player_deleteBuild","_player_lockUnlock_crtl","_hasHotwireKit","_isModular","_isModularDoor","_temp_keys_names","_hasAttached","_allowTow","_liftHeli","_found","_posL","_posC","_height","_attached","_vehicleOwnerID","_totalKeys","_hasBarrel","_isDisallowRefuel"];
private ["_canPickLight","_text","_dir","_canDoThis","_w2m","_bb","_waterHoles","_unlock","_lock","_totalKeys","_temp_keys","_temp_keys_names","_hasKey","_oldOwner","_hasAttached","_isAnimal","_isZombie","_isHarvested","_isMan","_isFuel","_hasRawMeat","_hastinitem","_player_deleteBuild","_player_lockUnlock_crtl","_displayName","_hasIgnators","_menu","_menu1","_allowTow","_liftHeli","_found","_posL","_posC","_height","_attached","_combi","_findNearestGen","_humanity_logic","_low_high","_cancel","_buy","_buyV","_humanity","_traderMenu","_warn","_typeOfCursorTarget","_isVehicle","_isBicycle","_isDestructable","_isGenerator","_ownerID","_isVehicletype","_hasBarrel","_hasFuel20","_hasFuel5","_hasEmptyFuelCan","_itemsPlayer","_hasToolbox","_hasbottleitem","_isAlive","_isPlant","_istypeTent","_upgradeItems","_isCampSite","_isDisallowRefuel","_isDog","_isModular","_isModularDoor","_isHouse","_isGate","_isFence","_isLockableGate","_isUnlocked","_isOpen","_isClosed","_ownerArray","_ownerBuildLock","_ownerPID","_speed","_dog","_vehicle","_inVehicle","_cursorTarget","_primaryWeapon","_currentWeapon","_magazinesPlayer","_onLadder","_canDo","_nearLight","_vehicleOwnerID","_hasHotwireKit","_isPZombie","_dogHandle","_allowedDistance"];
_vehicle = vehicle player;
_inVehicle = (_vehicle != player);
@@ -441,7 +441,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
};
//remove Own objects
if (_ownerID == dayz_characterID) then {
if (_ownerID == dayz_characterID) then {
//upgrade items
if (_typeOfCursorTarget in _upgradeItems) then {
if (s_player_upgradestroage < 0) then {
@@ -464,8 +464,6 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
s_player_packtent = -1;
};
} else {
player removeAction s_player_deleteBuild;
s_player_deleteBuild = -1;
player removeAction s_player_upgradestroage;
s_player_upgradestroage = -1;
player removeAction s_player_packtent;