mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-25 19:26:08 +03:00
Add new unit_setFractures function to handle better broken bones
- Removes old object_setHit - Double checks if global broken bone variables are properly set after changing clothes. - This should finally fix broken bones after changing clothes.
This commit is contained in:
@@ -1,17 +1,11 @@
|
||||
private ["_msg","_unit","_medic","_item"];
|
||||
local _unit = _this select 0;
|
||||
local _medic = _this select 1;
|
||||
local _item = _this select 2;
|
||||
local _displayName = getText(configFile >> "CfgMagazines" >> _item >> "displayName");
|
||||
|
||||
_unit = _this select 0;
|
||||
_medic = _this select 1;
|
||||
_item = _this select 2;
|
||||
|
||||
r_fracture_legs = false;
|
||||
r_fracture_arms = false;
|
||||
_unit setHit["legs",0];
|
||||
_unit setHit["hands",0];
|
||||
_unit setVariable ["hit_legs",0,true];
|
||||
_unit setVariable ["hit_hands",0,true];
|
||||
[_unit,"legs",0,false,false] call unit_setFractures;
|
||||
[_unit,"hands",0,false,false] call unit_setFractures;
|
||||
|
||||
if (_medic != player) then {
|
||||
_msg = if (_item == "equip_woodensplint") then {"STR_ITEM_NAME_WOODENSPLINT"} else {"STR_EQUIP_NAME_15"};
|
||||
format [localize "str_actions_medical_general_received",(name _medic), localize _msg] call dayz_rollingMessages;
|
||||
};
|
||||
format [localize "str_actions_medical_general_received",(name _medic),_displayName] call dayz_rollingMessages;
|
||||
};
|
||||
Reference in New Issue
Block a user