+ Fixed females unable to select gender after death.
+ Fixed Alice and Assault packs inventory issues created with last
patch.
+ Fixed being unable to take items that may have already been claimed by
another player. Should work if no other players are within 6 meters.
+ Cooking, Crafting, Repairing, and Salvaging all now require full Medic
animation cycle to complete. You can cancel the process just by moving.
+ Traders that deal with magazine items now require full Medic animation
cycle per trade. Also, number of possible trades now based on quantity
of available items being sold or cost divided by available bars.
+ Changed several PublicVariable calls from 1.7.6.1 code sync that
should have been PublicVariableServer.
+ Fixed Bio-meat was not causing infection and increased chance of
infection from "Bad Food" to 50/50.
+ Added distance checks (5m) for player zombie attacks.
+ Fixed player zombie was unable to feed.
This commit is contained in:
vbawol
2013-03-15 12:17:18 -05:00
parent c4ea450657
commit 21291e389e
26 changed files with 521 additions and 384 deletions

View File

@@ -1,18 +1,27 @@
private["_config","_item","_text","_rawmeat","_cookedmeat","_meat","_meatcooked","_qty","_id"];
diag_log ("Cook Enabled");
if(TradeInprogress) exitWith { cutText ["Cooking already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
// diag_log ("Cook Enabled");
player removeAction s_player_cook;
s_player_cook = -1;
_rawmeat = meatraw;
_cookedmeat = meatcooked;
{
_meat = _x;
_meatcooked = _cookedmeat select (_rawmeat find _meat);
_removed = 0;
if (_meat in magazines player) then {
_text = getText (configFile >> "CfgMagazines" >> _meatcooked >> "displayName");
cutText [format["Started cooking %1 of %2",_qty,_text], "PLAIN DOWN"];
_qty = {_x == _meat} count magazines player;
player playActionNow "Medic";
_dis=6;
@@ -20,15 +29,51 @@ _cookedmeat = meatcooked;
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep _qty;
for "_x" from 1 to _qty do {
player removeMagazine _meat;
player addMagazine _meatcooked;
if !(_meat in magazines player) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
};
//disableSerialization;
//call dayz_forceSave;
r_interrupt = false;
_animState = animationState player;
r_doLoop = true;
_started = false;
_finished = false;
while {r_doLoop} do {
_animState = animationState player;
_isMedic = ["medic",_animState] call fnc_inString;
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
r_doLoop = false;
_finished = true;
};
if (r_interrupt) then {
r_doLoop = false;
};
sleep 0.1;
};
r_doLoop = false;
cutText [format[(localize "str_success_cooked"),_qty,_text], "PLAIN DOWN"];
if (_finished) then {
_removed = _removed + ([player,_meat,_qty] call BIS_fnc_invRemove);
// Add only number of items removed
for "_x" from 1 to _removed do {
player addMagazine _meatcooked;
};
cutText [format[(localize "str_success_cooked"),_qty,_text], "PLAIN DOWN"];
} else {
r_interrupt = false;
[objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop";
cutText [format["Canceled cooking %1 of %2",_qty,_text], "PLAIN DOWN"];
// player addMagazine "ItemBandage";
};
};
} forEach _rawmeat;
} forEach _rawmeat;
TradeInprogress = false;