mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Adding more debug
This commit is contained in:
parent
813e54a668
commit
2bc20501bc
@ -259,6 +259,7 @@ if (USE_WOUND_EVENT_SYNC) then {
|
||||
|
||||
["SettingsInitialized", {
|
||||
if (GVAR(level) == 2) exitwith {
|
||||
TRACE_6("ACE_DEBUG: SettingsInitialized_EH_ADVANCED",(_this select 0), GVAR(level),(_this select 0) getvariable QGVAR(bloodVolume),(_this select 0) getvariable QGVAR(pain), (_this select 0) getvariable QGVAR(painSuppress), [_this select 0] call FUNC(getBloodLoss));
|
||||
[
|
||||
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 65)},
|
||||
{(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.9},
|
||||
@ -270,6 +271,8 @@ if (USE_WOUND_EVENT_SYNC) then {
|
||||
] call FUNC(addUnconsciousCondition);
|
||||
};
|
||||
|
||||
TRACE_6("ACE_DEBUG: SettingsInitialized_EH_BASIC",(_this select 0), GVAR(level),(_this select 0) getvariable QGVAR(bloodVolume),(_this select 0) getvariable QGVAR(pain), (_this select 0) getvariable QGVAR(painSuppress), [_this select 0] call FUNC(getBloodLoss));
|
||||
|
||||
[
|
||||
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 40)},
|
||||
{(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.6},
|
||||
|
@ -17,12 +17,11 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_selection", "_damage", "_shooter", "_projectile"];
|
||||
TRACE_5("ACE_DEBUG: HandleDamage Called",_unit, _selection, _damage, _shooter, _projectile);
|
||||
|
||||
// bug, apparently can fire for remote units in special cases
|
||||
if !(local _unit) exitWith {
|
||||
#ifdef DEBUG_ENABLED_MEDICAL
|
||||
ACE_LOGDEBUG_3("HandleDamage on remote unit! - %1 - %2 - %3", diag_frameno, _unit, isServer);
|
||||
#endif
|
||||
TRACE_2("ACE_DEBUG: HandleDamage on remote unit!",_unit, isServer);
|
||||
nil
|
||||
};
|
||||
|
||||
@ -34,9 +33,7 @@ private ["_damageReturn", "_typeOfDamage", "_minLethalDamage", "_newDamage", "_
|
||||
_this set [4, _projectile];
|
||||
};*/
|
||||
|
||||
#ifdef DEBUG_ENABLED_MEDICAL
|
||||
ACE_LOGDEBUG_3("HandleDamage - %1 - %2 - %3", diag_frameno, _selection, _damage);
|
||||
#endif
|
||||
TRACE_3("ACE_DEBUG: HandleDamage",_selection,_damage, _unit);
|
||||
|
||||
// If damage is in dummy hitpoints, "hands" and "legs", don't change anything
|
||||
if (_selection == "hands") exitWith {_unit getHit "hands"};
|
||||
@ -52,9 +49,7 @@ if !(_unit getVariable [QGVAR(allowDamage), true]) exitWith {
|
||||
} else {
|
||||
_unit getHit _selection
|
||||
};
|
||||
#ifdef DEBUG_ENABLED_MEDICAL
|
||||
ACE_LOGDEBUG_3("HandleDamage damage disabled. - %1 - %2 - %3", diag_frameno, _unit, _selection);
|
||||
#endif
|
||||
TRACE_3("ACE_DEBUG: HandleDamage damage disabled.",_selection,damage _unit, _unit);
|
||||
};
|
||||
|
||||
//if (true) exitWith {nil};//
|
||||
|
@ -14,11 +14,14 @@
|
||||
|
||||
private ["_damageBodyParts", "_cache_params", "_cache_damages"];
|
||||
params ["_target"];
|
||||
TRACE_1("ACE_DEBUG: HandleDamage_BASIC Called",_target);
|
||||
|
||||
_damageBodyParts = _target getvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]];
|
||||
_cache_params = _target getVariable [QGVAR(cachedHandleDamageParams), []];
|
||||
_cache_damages = _target getVariable QGVAR(cachedDamages);
|
||||
|
||||
TRACE_4("ACE_DEBUG: HandleDamage BASIC",_unit, _damageBodyParts,_cache_params,_cache_damages);
|
||||
|
||||
{
|
||||
_x params ["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile","_typeOfDamage"];
|
||||
if !(isNull _sourceOfDamage && {_typeOfProjectile == ""} && {vehicle _unit == _unit} && {(_selectionName == "head" || isBurning _unit)}) then {
|
||||
@ -44,6 +47,7 @@ _cache_damages = _target getVariable QGVAR(cachedDamages);
|
||||
|
||||
// We broadcast the value across the net here, in order to avoid broadcasting it multiple times earlier in the above code block
|
||||
_target setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
||||
TRACE_2("ACE_DEBUG: HandleDamage BASIC Broadcast value here",_unit, _target getvariable QGVAR(bodyPartStatus));
|
||||
|
||||
EXPLODE_6_PVT(_damageBodyParts,_headDamage,_torsoDamage,_handsDamageR,_handsDamageL,_legsDamageR,_legsDamageL);
|
||||
_target setHitPointDamage ["hitHead", _headDamage min 0.95];
|
||||
|
@ -23,6 +23,8 @@ private ["_unit", "_minWaitingTime", "_slotInfo", "_hasMovedOut", "_parachuteChe
|
||||
params ["_args", "_idPFH"];
|
||||
_args params ["_unit", "_originalPos", "_startingTime", "_minWaitingTime", "_hasMovedOut", "_parachuteCheck"];
|
||||
|
||||
TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _originalPos, _startingTime, _minWaitingTime, _hasMovedOut, _parachuteCheck);
|
||||
|
||||
if (!alive _unit) exitwith {
|
||||
if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then {
|
||||
TRACE_1("Removing fake weapon [on death]",_unit);
|
||||
@ -39,11 +41,14 @@ if (!alive _unit) exitwith {
|
||||
[_unit, "isUnconscious"] call EFUNC(common,unmuteUnit);
|
||||
["medical_onUnconscious", [_unit, false]] call EFUNC(common,globalEvent);
|
||||
|
||||
TRACE_3("ACE_DEBUG_Unconscious_Exit",_unit, (!alive _unit) , QGVAR(unconscious));
|
||||
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation
|
||||
if !(_unit getvariable ["ACE_isUnconscious",false]) exitwith {
|
||||
TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getvariable QGVAR(unconsciousArguments),animationState _unit);
|
||||
// TODO, handle this with carry instead, so we can remove the PFH here.
|
||||
// Wait until the unit isn't being carried anymore, so we won't end up with wierd animations
|
||||
if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then {
|
||||
@ -124,6 +129,7 @@ if (_parachuteCheck) then {
|
||||
};
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getvariable QGVAR(unconsciousArguments));
|
||||
_args set [3, _minWaitingTime - (ACE_time - _startingTime)];
|
||||
_unit setvariable [QGVAR(unconsciousArguments), _args, true];
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
@ -131,6 +137,7 @@ if (!local _unit) exitwith {
|
||||
|
||||
// Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs
|
||||
if ((ACE_time - _startingTime) >= _minWaitingTime) exitwith {
|
||||
TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition));
|
||||
if (!([_unit] call FUNC(getUnconsciousCondition))) then {
|
||||
_unit setvariable ["ACE_isUnconscious", false, true];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user