+ formatting for damage percentage for repair and salvage.
+ Chance to break part when salvaging damaged parts.
+ Potential fix for purchased vehicle damage handler.
+ added check when cracking vault to exit when toolbox is broken
+ Potential fix for glitched extra crack vault options and no delay.
+ 1.7.5.1
This commit is contained in:
vbawol
2013-02-05 07:56:39 -06:00
parent d60007afc9
commit ca32bcbf71
14 changed files with 184 additions and 50 deletions

View File

@@ -1,28 +1,30 @@
private["_item","_qty","_type","_meat","_loop"];
_item = _this select 0;
private["_animalbody","_qty","_rawfoodtype","_ehLoc"];
_animalbody = _this select 0;
_qty = _this select 1;
_type = typeOf _item;
_meat = 0;
_loop = true;
_rawfoodtype = getText (configFile >> "CfgSurvival" >> "Meat" >> _type >> "rawfoodtype");
_rawfoodtype = getText (configFile >> "CfgSurvival" >> "Meat" >> typeOf _animalbody >> "rawfoodtype");
if (local _item) then {
if (local _animalbody) then {
for "_x" from 1 to _qty do {
_item addMagazine _rawfoodtype;
_animalbody addMagazine _rawfoodtype;
};
sleep 2;
_timer = time;
while {_loop} do {
_meat = count magazines _item;
if (_meat == 0) then {_loop = false};
if ((time - _timer) > 300) then {_loop = false};
sleep 1;
sleep 1;
[time, _animalbody] spawn {
private ["_timer", "_body"];
_timer = _this select 0;
_body = _this select 1;
while {(count magazines _body >0) and (time - _timer < 300) } do {
sleep 5;
};
["dayzHideBody",_body] call broadcastRpcCallAll;
sleep 5;
deleteVehicle _body;
true;
};
["dayzHideBody",_item] call broadcastRpcCallAll;
sleep 10;
deleteVehicle _item;
} else {
_ehLoc = "client";
if (isServer) then { _ehLoc = "server"; };
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_item)];
};
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_animalbody)];
};