mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-24 09:00:50 +03:00
0.997a
+ 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:
@@ -1,4 +1,8 @@
|
||||
private["_vehicle","_part","_hitpoint","_type","_selection","_array"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Repair already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_id = _this select 2;
|
||||
_array = _this select 3;
|
||||
_vehicle = _array select 0;
|
||||
@@ -6,8 +10,6 @@ _part = _array select 1;
|
||||
_hitpoint = _array select 2;
|
||||
_type = typeOf _vehicle;
|
||||
|
||||
// if ((count (crew _vehicle)) > 0) exitWith {cutText ["You may not repair while someone is in the vehicle", "PLAIN DOWN"]};
|
||||
|
||||
//
|
||||
_hasToolbox = "ItemToolbox" in items player;
|
||||
_section = _part in magazines player;
|
||||
@@ -20,42 +22,69 @@ s_player_repair_crtl = 1;
|
||||
|
||||
if (_section and _hasToolbox) then {
|
||||
|
||||
_damage = [_vehicle,_hitpoint] call object_getHit;
|
||||
_vehicle removeAction _id;
|
||||
player playActionNow "Medic";
|
||||
|
||||
//dont waste loot on undamaged parts
|
||||
if (_damage > 0) then {
|
||||
|
||||
player removeMagazine _part;
|
||||
_dis=20;
|
||||
_sfx = "repair";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
//disableSerialization;
|
||||
//call dayz_forceSave;
|
||||
|
||||
//Fix the part
|
||||
_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
|
||||
//vehicle is owned by whoever is in it, so we have to have each client try and fix it
|
||||
//["dayzSetFix",[_vehicle,_selection,0],_vehicle] call broadcastRpcCallIfLocal;
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
dayzSetFix = [_vehicle,_selection,0];
|
||||
publicVariable "dayzSetFix";
|
||||
if (local _vehicle) then {
|
||||
dayzSetFix call object_setFixServer;
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
|
||||
player playActionNow "Medic";
|
||||
sleep 1;
|
||||
|
||||
_dis=20;
|
||||
_sfx = "repair";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
sleep 5;
|
||||
_vehicle setvelocity [0,0,1];
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
//Success!
|
||||
cutText [format["You have successfully attached %1 to the %2",_namePart,_nameType], "PLAIN DOWN"];
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_damage = [_vehicle,_hitpoint] call object_getHit;
|
||||
_vehicle removeAction _id;
|
||||
|
||||
//dont waste loot on undamaged parts
|
||||
if (_damage > 0) then {
|
||||
|
||||
player removeMagazine _part;
|
||||
|
||||
//Fix the part
|
||||
_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
|
||||
|
||||
//vehicle is owned by whoever is in it, so we have to have each client try and fix it
|
||||
dayzSetFix = [_vehicle,_selection,0];
|
||||
publicVariable "dayzSetFix";
|
||||
if (local _vehicle) then {
|
||||
dayzSetFix call object_setFixServer;
|
||||
};
|
||||
|
||||
_vehicle setvelocity [0,0,1];
|
||||
|
||||
//Success!
|
||||
cutText [format["You have successfully attached %1 to the %2",_namePart,_nameType], "PLAIN DOWN"];
|
||||
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
cutText ["Canceled Repair.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
@@ -86,4 +115,6 @@ if (_allFixed) then {
|
||||
};
|
||||
};
|
||||
|
||||
s_player_repair_crtl = -1;
|
||||
s_player_repair_crtl = -1;
|
||||
|
||||
TradeInprogress = false;
|
||||
Reference in New Issue
Block a user