+ 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,40 +1,71 @@
// medBreakLegs.sqf
private["_array","_unit","_medic","_display","_control","_hitLegs","_hitArms"];
private["_array","_unit","_attacker","_display","_control","_hitLegs","_hitArms"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
_attacker = _array select 1;
if (local _unit && _unit == player) then {
if (_unit == player && player distance _attacker < 5) then {
_unit setVariable["startcombattimer", 1, false];
player setVariable["startcombattimer", 1, false];
// Make bleed
if (random 2 < 1) then {
r_player_injured = true;
player setVariable ["USEC_injured",true,true];
// Find hit
_cnt = count (DAYZ_woundHit_ok select 1);
_index = floor (random _cnt);
_index = (DAYZ_woundHit_ok select 1) select _index;
_hit = (DAYZ_woundHit_ok select 0) select _index;
_damage = 0.1 + random (1.2);
//Record Damage to Minor parts (legs, arms)
if (_hit in USEC_MinorWounds) then {
[_unit,_hit,_damage] call object_processHit;
};
player setVariable["medForceUpdate",true,true];
//Ensure Control is visible for bleeding
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1300;
_control ctrlShow true;
1 call fnc_usec_bulletHit;
_wound = _hit call fnc_usec_damageGetWound;
//Create Wound
_unit setVariable[_wound,true,true];
[_unit,_wound,_hit] spawn fnc_usec_damageBleed;
usecBleed = [_unit,_wound,_hit];
publicVariable "usecBleed";
//Set Injured if not already
_isInjured = _unit getVariable["USEC_injured",false];
if (!_isInjured) then {
_unit setVariable["USEC_injured",true,true];
dayz_sourceBleeding = _attacker;
};
//Set ability to give blood
_lowBlood = _unit getVariable["USEC_lowBlood",false];
if (!_lowBlood) then {
_unit setVariable["USEC_lowBlood",true,true];
};
r_player_injured = true;
// reduce blood
r_player_blood = r_player_blood - 50;
// Make player infected
if (random 5 < 1) then {
r_player_infected = true;
player setVariable["USEC_infected",true,true];
};
};
// Make player infected
if (random 5 < 1) then {
r_player_infected = true;
player setVariable["USEC_infected",true,true];
};
[_unit,"hit",2,false] call dayz_zombieSpeak;
// Break legs
if (random 25 < 1) then {
// break legs
};
// Knock out
if (random 100 < 1) then {
// perform knockout
};
player setVariable["medForceUpdate",true];
};