Clean up of handleDamage. Fixes some debug code

This commit is contained in:
Glowbal 2015-09-05 11:25:56 +02:00
parent df3dbc9772
commit cd9e5df782

View File

@ -28,10 +28,10 @@ if !(local _unit) exitWith {
private ["_damageReturn", "_typeOfDamage", "_minLethalDamage", "_newDamage", "_typeIndex", "_preventDeath"];
// bug, assumed fixed, @todo excessive testing, if nothing happens remove
/*if (typeName _projectile == "OBJECT") then {
if (typeName _projectile == "OBJECT") then {
_projectile = typeOf _projectile;
_this set [4, _projectile];
};*/
};
TRACE_3("ACE_DEBUG: HandleDamage",_selection,_damage, _unit);
@ -44,16 +44,14 @@ if (_selection != "" && {!(_selection in GVAR(SELECTIONS))}) exitWith {0}; //@to
// Exit if we disable damage temporarily
if !(_unit getVariable [QGVAR(allowDamage), true]) exitWith {
TRACE_3("ACE_DEBUG: HandleDamage damage disabled.",_selection,damage _unit, _unit);
if (_selection == "") then {
damage _unit
} else {
_unit getHit _selection
};
TRACE_3("ACE_DEBUG: HandleDamage damage disabled.",_selection,damage _unit, _unit);
};
//if (true) exitWith {nil};//
// Get return damage
_damageReturn = _damage;