mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
use new macro
This commit is contained in:
parent
feac296f9c
commit
5875f58604
@ -8,7 +8,7 @@
|
|||||||
reverse _allHitPoints;
|
reverse _allHitPoints;
|
||||||
|
|
||||||
if (_allHitPoints param [0, ""] != "ACE_HDBracket") then {
|
if (_allHitPoints param [0, ""] != "ACE_HDBracket") then {
|
||||||
ACE_LOGERROR_1("Bad hitpoints for unit type ""%1""",typeOf _unit);
|
ERROR_1("Bad hitpoints for unit type ""%1""",typeOf _unit);
|
||||||
} else {
|
} else {
|
||||||
// Calling this function inside curly brackets allows the usage of
|
// Calling this function inside curly brackets allows the usage of
|
||||||
// "exitWith", which would be broken with "HandleDamage" otherwise.
|
// "exitWith", which would be broken with "HandleDamage" otherwise.
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
params [["_unit", objNull, [objNull]], ["_selection", "", [""]], ["_damage", true, [false]]];
|
params [["_unit", objNull, [objNull]], ["_selection", "", [""]], ["_damage", true, [false]]];
|
||||||
|
|
||||||
if (!local _unit) exitWith {
|
if (!local _unit) exitWith {
|
||||||
ACE_LOGERROR("Unit not local or null");
|
ERROR("Unit not local or null");
|
||||||
};
|
};
|
||||||
|
|
||||||
_damage = [0, 0.495] select _damage;
|
_damage = [0, 0.495] select _damage;
|
||||||
|
@ -25,7 +25,7 @@ params [["_unit", objNull, [objNull]], ["_type", "hit", [""]], ["_severity", 0,
|
|||||||
TRACE_3("",_unit,_type,_severity);
|
TRACE_3("",_unit,_type,_severity);
|
||||||
|
|
||||||
if (!local _unit) exitWith {
|
if (!local _unit) exitWith {
|
||||||
ACE_LOGERROR("Unit not local or null");
|
ERROR("Unit not local or null");
|
||||||
};
|
};
|
||||||
|
|
||||||
private _timeOut = [TIME_OUT_HIT, TIME_OUT_MOAN] select (_type == "moan");
|
private _timeOut = [TIME_OUT_HIT, TIME_OUT_MOAN] select (_type == "moan");
|
||||||
@ -60,7 +60,7 @@ if (isNil "_sounds") then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (isNil "_sounds") exitWith {
|
if (isNil "_sounds") exitWith {
|
||||||
ACE_LOGERROR("No sounds for speaker and no default found");
|
ERROR("No sounds for speaker and no default found");
|
||||||
};
|
};
|
||||||
|
|
||||||
// Get correct sound of the speaker
|
// Get correct sound of the speaker
|
||||||
@ -68,7 +68,7 @@ _sounds = _sounds param [_severity, []];
|
|||||||
(selectRandom _sounds) params ["_sound", ["_volume", 1], ["_frequency", 1], ["_distance", 80]];
|
(selectRandom _sounds) params ["_sound", ["_volume", 1], ["_frequency", 1], ["_distance", 80]];
|
||||||
|
|
||||||
if (isNil "_sound") exitWith {
|
if (isNil "_sound") exitWith {
|
||||||
ACE_LOGERROR("No sound for this speaker");
|
ERROR("No sound for this speaker");
|
||||||
};
|
};
|
||||||
|
|
||||||
// Delete leading slash.
|
// Delete leading slash.
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
params [["_unit", objNull, [objNull]], ["_isLimping", true, [false]]];
|
params [["_unit", objNull, [objNull]], ["_isLimping", true, [false]]];
|
||||||
|
|
||||||
if (!local _unit) exitWith {
|
if (!local _unit) exitWith {
|
||||||
ACE_LOGERROR("Unit not local or null");
|
ERROR("Unit not local or null");
|
||||||
};
|
};
|
||||||
|
|
||||||
_unit setVariable [QGVAR(isLimping), _isLimping, true];
|
_unit setVariable [QGVAR(isLimping), _isLimping, true];
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
params [["_unit", objNull, [objNull]], ["_isInPain", true, [false]]];
|
params [["_unit", objNull, [objNull]], ["_isInPain", true, [false]]];
|
||||||
|
|
||||||
if (!local _unit) exitWith {
|
if (!local _unit) exitWith {
|
||||||
ACE_LOGERROR("Unit not local or null");
|
ERROR("Unit not local or null");
|
||||||
};
|
};
|
||||||
|
|
||||||
_unit setVariable [GVAR(isInPain), _isInPain, true];
|
_unit setVariable [GVAR(isInPain), _isInPain, true];
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
params [["_unit", objNull, [objNull]], ["_damage", 0, [0]]];
|
params [["_unit", objNull, [objNull]], ["_damage", 0, [0]]];
|
||||||
|
|
||||||
if (!local _unit) exitWith {
|
if (!local _unit) exitWith {
|
||||||
ACE_LOGERROR("Unit not local or null");
|
ERROR("Unit not local or null");
|
||||||
};
|
};
|
||||||
|
|
||||||
private _hitPointDamages = getAllHitPointsDamage _unit param [2, []];
|
private _hitPointDamages = getAllHitPointsDamage _unit param [2, []];
|
||||||
|
Loading…
Reference in New Issue
Block a user