Minor improvements to handleTreatment

This commit is contained in:
Thomas Kooi 2015-01-21 15:53:18 +01:00
parent 7e5806b834
commit dcd42f55e8

View File

@ -35,9 +35,14 @@ if ([_caller] call FUNC(isSetTreatmentMutex)) exitwith {
[_caller, true] call FUNC(treatmentMutex); [_caller, true] call FUNC(treatmentMutex);
if (!([_caller, _target, _removeItem] call FUNC(hasEquipment)) && _removeItem != "") exitwith { if (!([_caller, _target, _removeItem] call FUNC(hasEquipment)) && _removeItem != "") exitwith {
[_caller,"release"] call FUNC(treatmentMutex); [_caller, false] call FUNC(treatmentMutex);
}; };
if (primaryWeapon _caller == "") then {
_caller addWeapon "ACE_FakePrimaryWeapon";
};
_caller selectWeapon (primaryWeapon _unit);
// TODO make dynamic // TODO make dynamic
switch (toLower _category) do { switch (toLower _category) do {
case "bandage": { case "bandage": {
@ -53,7 +58,7 @@ switch (toLower _category) do {
([_caller, _target, _selectionName, _removeItem] call FUNC(handleTreatment_Category_Airway)); ([_caller, _target, _selectionName, _removeItem] call FUNC(handleTreatment_Category_Airway));
}; };
default { default {
// do not handle the request // Do not handle the request
false; false;
}; };
}; };