Fixed #1132 mistake

Thanks Skaronator
This commit is contained in:
Florian Kinder
2014-02-17 00:15:14 +01:00
parent c3cdd80c4d
commit 72dee3c644
3 changed files with 17 additions and 20 deletions

View File

@@ -42,24 +42,19 @@ _sfx = "eat";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
if (dayz_lastMeal < 3600) then {
if (dayz_lastMeal < 3600) then {
if (_itemorignal == "FoodSteakCooked") then {
//_regen = _regen * (10 - (10 max ((time - _Cookedtime) / 3600)));
};
};
if (_hasoutput) then {
if (_hasoutput && !_invehicle) then {
// Selecting output
_itemtodrop = food_output select (food_with_output find _itemorignal);
if (_invehicle) exitWith {
sleep 2;
(vehicle player) addMagazineCargoGlobal [_itemtodrop,1];
};
sleep 3;
_nearByPile= nearestObjects [(getposATL player), ["WeaponHolder","WeaponHolderBase"],2];
if (count _nearByPile ==0) then {
if (count _nearByPile ==0) then {
_iPos = getPosATL player;
_radius = 0.0;
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
@@ -70,6 +65,11 @@ if (_hasoutput) then {
_item addMagazineCargoGlobal [_itemtodrop,1];
};
if (_invehicle) then {
sleep 2;
(vehicle player) addMagazineCargoGlobal [_itemtodrop,1];
};
if (_rawfood and !_rawexceptions and (random 15 < 1)) then {
r_player_infected = true;
player setVariable["USEC_infected",true,true];