mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
fixes #1535
After eating in a vehicle that should drop an empty can, client RPT would show: Error Undefined variable in expression: _itemtodrop
This commit is contained in:
@@ -48,26 +48,26 @@ if (dayz_lastMeal < 3600) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_hasoutput && !_invehicle) then {
|
if (_hasoutput) then {
|
||||||
// Selecting output
|
// Selecting output
|
||||||
_itemtodrop = food_output select (food_with_output find _itemorignal);
|
_itemtodrop = food_output select (food_with_output find _itemorignal);
|
||||||
|
|
||||||
sleep 3;
|
if (!_invehicle) then {
|
||||||
_nearByPile= nearestObjects [(getposATL player), ["WeaponHolder","WeaponHolderBase"],2];
|
sleep 3;
|
||||||
if (count _nearByPile ==0) then {
|
_nearByPile = nearestObjects [(getPosATL player), ["WeaponHolder","WeaponHolderBase"],2];
|
||||||
_iPos = getPosATL player;
|
if (count _nearByPile == 0) then {
|
||||||
_radius = 0.0;
|
_iPos = getPosATL player;
|
||||||
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
_radius = 0.0;
|
||||||
_item setposATL _iPos;
|
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
|
||||||
} else {
|
_item setPosATL _iPos;
|
||||||
_item = _nearByPile select 0;
|
} else {
|
||||||
};
|
_item = _nearByPile select 0;
|
||||||
_item addMagazineCargoGlobal [_itemtodrop,1];
|
};
|
||||||
};
|
_item addMagazineCargoGlobal [_itemtodrop,1];
|
||||||
|
} else {
|
||||||
if (_hasoutput && _invehicle) then {
|
sleep 2;
|
||||||
sleep 2;
|
(vehicle player) addMagazineCargoGlobal [_itemtodrop,1];
|
||||||
(vehicle player) addMagazineCargoGlobal [_itemtodrop,1];
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_rawfood && !_rawexceptions && (random 15 < 1)) then {
|
if (_rawfood && !_rawexceptions && (random 15 < 1)) then {
|
||||||
|
|||||||
Reference in New Issue
Block a user