mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix bandage reopening classname/category lookup
This commit is contained in:
parent
e817e13cfd
commit
0d0cf38028
@ -21,8 +21,10 @@ params ["_target", "_impact", "_part", "_injuryIndex", "_injury", "_bandage"];
|
||||
|
||||
private _classID = _injury select 1;
|
||||
private _bodyPartN = _injury select 2;
|
||||
private _className = EGVAR(medical_damage,woundClassNames) select _classID;
|
||||
|
||||
private _category = _injury select 6;
|
||||
private _postfix = ["Minor", "Medium", "Large"] select _category;
|
||||
private _className = format ["%1%2", EGVAR(medical_damage,woundClassNames) select _classID, _postfix];
|
||||
|
||||
// default, just in case..
|
||||
private _reopeningChance = 0.1;
|
||||
private _reopeningMinDelay = 120;
|
||||
@ -62,8 +64,8 @@ TRACE_5("configs",_bandage,_className,_reopeningChance,_reopeningMinDelay,_reope
|
||||
private _bandagedWounds = _target getVariable [QEGVAR(medical,bandagedWounds), []];
|
||||
private _exist = false;
|
||||
{
|
||||
_x params ["", "_id", "_partN", "_amountOf"];
|
||||
if (_id == _classID && {_partN == _bodyPartN}) exitWith {
|
||||
_x params ["", "_id", "_partN", "_amountOf", "_bleeding", "_damage", "_oldCategory"];
|
||||
if (_id == _classID && {_partN == _bodyPartN && {_oldCategory == _category}}) exitWith {
|
||||
_x set [3, _amountOf + _impact];
|
||||
_bandagedWounds set [_forEachIndex, _x];
|
||||
_exist = true;
|
||||
@ -97,8 +99,8 @@ if (random 1 <= _reopeningChance) then {
|
||||
private _bandagedWounds = _target getVariable [QEGVAR(medical,bandagedWounds), []];
|
||||
private _exist = false;
|
||||
{
|
||||
_x params ["", "_id", "_partN", "_amountOf"];
|
||||
if (_id == _classID && {_partN == _bodyPartN}) exitWith {
|
||||
_x params ["", "_id", "_partN", "_amountOf", "_bleeding", "_damage", "_oldCategory"];
|
||||
if (_id == _classID && {_partN == _bodyPartN && {_oldCategory == _category}}) exitWith {
|
||||
_x set [3, 0 max (_amountOf - _impact)];
|
||||
_bandagedWounds set [_forEachIndex, _x];
|
||||
_exist = true;
|
||||
|
Loading…
Reference in New Issue
Block a user