This commit is contained in:
jokoho48 2015-08-22 17:10:19 +02:00
parent 21e0a9fff3
commit 10127ed957
4 changed files with 9 additions and 9 deletions

View File

@ -13,7 +13,7 @@
*/
#include "script_component.hpp"
d
private ["_log", "_inList", "_amount"];
params ["_unit", "_newItem"];

View File

@ -21,7 +21,7 @@
private ["_className", "_reopeningChance", "_reopeningMinDelay", "_reopeningMaxDelay", "_config", "_woundTreatmentConfig", "_bandagedWounds", "_exist", "_injuryId", "_existingInjury", "_delay", "_openWounds", "_selectedInjury", "_bandagedInjury"];
params ["_target", "_impact", "_part", "_injuryIndex", "_injury", "_bandage"];
_injury parmas ["_classID", "_injuryType"];
_classID = _injury select 1;
_className = GVAR(woundClassNames) select _classID;
// default, just in case..
@ -52,11 +52,11 @@ if (isClass (_config >> _className)) then {
};
_bandagedWounds = _target getvariable [QGVAR(bandagedWounds), []];
_injuryType = _injury select 1;
_exist = false;
_bandagedInjury = [];
{
_x params ["", "_injuryTypeX", "_injuryX"];
if (_injuryTypeX == _injuryType && _injuryTypeX == (_injury select 2)) exitwith {
if ((_x select 1) == _injuryType && (_x select 2) == (_injury select 2)) exitwith {
_exist = true;
_existingInjury = _x;
_existingInjury set [3, (_existingInjury select 3) + _impact];
@ -93,8 +93,7 @@ if (random(1) <= _reopeningChance) then {
_exist = false;
_injuryId = _injury select 1;
{
_x params ["_injuryIdX", "_injuryX"];
if (_injuryIdX == _injuryId && _injuryX == (_injury select 2)) exitwith {
if ((_x select 1) == _injuryId && (_x select 2) == (_injury select 2)) exitwith {
_exist = true;
_existingInjury = _x;
_existingInjury set [3, ((_existingInjury select 3) - _impact) max 0];

View File

@ -17,12 +17,12 @@ params ["_unit"];
if (!local _unit) exitwith {};
private ["_bodyStatus", "_headDamage", "_torsoDamage", "_handsDamage", "_legsDamage"];
private "_bodyStatus";
// ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]
_bodyStatus = _unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
_bodyStatus params ["_headDamage", "_torsoDamage", "_handsDamageR", "_handsDamageL", "_legsDamageR", "_legsDamageL"]
_bodyStatus params ["_headDamage", "_torsoDamage", "_handsDamageR", "_handsDamageL", "_legsDamageR", "_legsDamageL"];
_unit setHitPointDamage ["hitHead", _headDamage min 0.95];
_unit setHitPointDamage ["hitBody", _torsoDamage min 0.95];

View File

@ -32,7 +32,8 @@ _woundsCreated = [];
call compile _extensionOutput;
_foundIndex = -1;
{
_x params ["_toAddClassID", "_bodyPartNToAdd"];
_toAddClassID = _x select 1;
_bodyPartNToAdd = _x select 2;
{
// Check if we have an id of the given class on the given bodypart already
if (_x select 1 == _toAddClassID && {_x select 2 == _bodyPartNToAdd}) exitwith {