0.981 + 1.7.6.1 CE

+ Increased raise horde distance to 65m.
+ decreased raise horde action timer to 7 seconds.
+ sync with 1.7.6.1 CE
This commit is contained in:
vbawol
2013-02-26 20:05:35 -06:00
parent 52461f4a52
commit 3c9df28ead
319 changed files with 5267 additions and 1695 deletions

View File

@@ -1,4 +1,4 @@
private["_onLadder","_item","_hasfooditem","_rawfood","_cookedfood","_config","_text","_regen","_id","_display"];
private["_onLadder","_itemorignal","_hasfooditem","_rawfood","_cookedfood","_hasoutput","_config","_text","_regen","_dis","_sfx","_Cookedtime","_itemtodrop","_nearByPile","_item","_display"];
disableserialization;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
@@ -9,46 +9,60 @@ if (vehicle player != player) exitWith {cutText ["You may not eat while in a veh
//Force players to wait 3 mins to eat again
//if (dayz_lastMeal < 180) exitWith {cutText ["You may not eat, you're already full", "PLAIN DOWN"]};
_item = _this;
_hasfooditem = _item in magazines player;
_itemorignal = _this;
_hasfooditem = _itemorignal in magazines player;
//_rawfood = _item in ["FoodSteakRaw","FoodmeatRaw","FoodbeefRaw","FoodmuttonRaw","FoodchickenRaw","FoodrabbitRaw","FoodbaconRaw"];
//_cookedfood = _item in ["FoodSteakCooked","FoodmeatCooked","FoodbeefCooked","FoodmuttonCooked","FoodchickenCooked","FoodrabbitCooked","FoodbaconCooked"];
_rawfood = _itemorignal in meatraw;
_cookedfood = _itemorignal in meatcooked;
_hasoutput = _itemorignal in food_with_output;
_badfood = _item in badfood;
_rawfood = _item in meatraw;
_cookedfood = _item in meatcooked;
_config = configFile >> "CfgMagazines" >> _item;
_config = configFile >> "CfgMagazines" >> _itemorignal;
_text = getText (_config >> "displayName");
_regen = getNumber (_config >> "bloodRegen");
if (!_hasfooditem) exitWith {cutText [format[(localize "str_player_31"),_text,"consume"] , "PLAIN DOWN"]};
player playActionNow "PutDown";
player removeMagazine _item;
player removeMagazine _itemorignal;
sleep 1;
_dis=6;
_sfx = "eat";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
if (dayz_lastMeal < 3600) then {
if (_item == "FoodSteakCooked") then {
if (_itemorignal == "FoodSteakCooked") then {
//_regen = _regen * (10 - (10 max ((time - _Cookedtime) / 3600)));
};
};
if (_hasoutput) then{
// Selecting output
_itemtodrop = food_output select (food_with_output find _itemorignal);
sleep 3;
_nearByPile= nearestObjects [(position player), ["WeaponHolder","WeaponHolderBase"],2];
if (count _nearByPile ==0) then {
_item = createVehicle ["WeaponHolder", position player, [], 0.0, "CAN_COLLIDE"];
} else {
_item = _nearByPile select 0;
};
_item addMagazineCargoGlobal [_itemtodrop,1];
};
if ( _rawfood and (random 15 < 1)) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
player setVariable["USEC_infected",true,true];
};
if ( _badfood and (random 7 < 1)) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
};
[player,"eat",0,false] call dayz_zombieSpeak;
if (!_rawfood and !_cookedfood) then{
player addMagazine "TrashTinCan";
player setVariable["USEC_infected",true,true];
};
r_player_blood = r_player_blood + _regen;
@@ -60,13 +74,13 @@ player setVariable ["messing",[dayz_hunger,dayz_thirst],true];
player setVariable["USEC_BloodQty",r_player_blood,true];
player setVariable["medForceUpdate",true];
["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
//["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
dayzPlayerSave = [player,[],true];
publicVariable "dayzPlayerSave";
dayz_lastMeal = time;
dayz_hunger = 0;
_id = [player,5,true,(getPosATL player)] spawn player_alertZombies;
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
(_display displayCtrl 1301) ctrlShow true;