mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Additional debug statements for caching and wounds.
This commit is contained in:
parent
315f46c6c6
commit
98202f4f38
@ -19,9 +19,9 @@
|
|||||||
private ["_pain"];
|
private ["_pain"];
|
||||||
|
|
||||||
params ["_unit", "_addedPain"];
|
params ["_unit", "_addedPain"];
|
||||||
|
|
||||||
//Only run on local units:
|
//Only run on local units:
|
||||||
if (!local _unit) exitWith {ERROR("unit is not local");};
|
if (!local _unit) exitWith {ERROR("unit is not local");};
|
||||||
|
TRACE_3("ACE_DEBUG: adjustPainLevel Called",_unit, _pain, _addedPain);
|
||||||
|
|
||||||
//Ignore if medical system disabled:
|
//Ignore if medical system disabled:
|
||||||
if (GVAR(level) == 0) exitWith {};
|
if (GVAR(level) == 0) exitWith {};
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
private ["_hitSelections", "_hitPoints", "_impactVelocity", "_newDamage", "_cache_hitpoints", "_cache_projectiles", "_cache_params", "_cache_damages"];
|
private ["_hitSelections", "_hitPoints", "_impactVelocity", "_newDamage", "_cache_hitpoints", "_cache_projectiles", "_cache_params", "_cache_damages"];
|
||||||
params ["_unit", "_selectionName", "_damage", "_source", "_projectile"];
|
params ["_unit", "_selectionName", "_damage", "_source", "_projectile"];
|
||||||
|
TRACE_8("ACE_DEBUG: HandleDamage_Caching Called",_unit, _selectionName, _damage, _source, _projectile,GVAR(SELECTIONS),GVAR(HITPOINTS),damage _unit);
|
||||||
_hitSelections = GVAR(SELECTIONS);
|
_hitSelections = GVAR(SELECTIONS);
|
||||||
_hitPoints = GVAR(HITPOINTS);
|
_hitPoints = GVAR(HITPOINTS);
|
||||||
|
|
||||||
@ -150,4 +150,6 @@ if (_selectionName != "") then {
|
|||||||
_unit setVariable [QGVAR(cachedHandleDamageParams), _cache_params];
|
_unit setVariable [QGVAR(cachedHandleDamageParams), _cache_params];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
TRACE_8("ACE_DEBUG: HandleDamage_Caching",_unit, _newDamage, _cache_params, _cache_damages, _unit getVariable QGVAR(cachedProjectiles), _unit getVariable QGVAR(cachedHitPoints), _unit getVariable QGVAR(cachedDamages), _unit getVariable QGVAR(cachedHandleDamageParams));
|
||||||
|
|
||||||
_newDamage
|
_newDamage
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
private ["_bodyPartn", "_injuryTypeInfo", "_allInjuriesForDamageType", "_allPossibleInjuries", "_highestPossibleDamage", "_highestPossibleSpot", "_minDamage", "_openWounds", "_woundID", "_toAddInjury", "_painToAdd", "_bloodLoss", "_bodyPartNToAdd", "_classType", "_damageLevels", "_foundIndex", "_i", "_injury", "_maxDamage", "_pain", "_painLevel", "_selections", "_toAddClassID", "_woundsCreated"];
|
private ["_bodyPartn", "_injuryTypeInfo", "_allInjuriesForDamageType", "_allPossibleInjuries", "_highestPossibleDamage", "_highestPossibleSpot", "_minDamage", "_openWounds", "_woundID", "_toAddInjury", "_painToAdd", "_bloodLoss", "_bodyPartNToAdd", "_classType", "_damageLevels", "_foundIndex", "_i", "_injury", "_maxDamage", "_pain", "_painLevel", "_selections", "_toAddClassID", "_woundsCreated"];
|
||||||
params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamage"];
|
params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamage"];
|
||||||
|
TRACE_6("ACE_DEBUG: HandleDamage Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage);
|
||||||
|
|
||||||
// Administration for open wounds and ids
|
// Administration for open wounds and ids
|
||||||
_openWounds = _unit getvariable[QGVAR(openWounds), []];
|
_openWounds = _unit getvariable[QGVAR(openWounds), []];
|
||||||
@ -60,3 +61,4 @@ if (count _woundsCreated > 0) then {
|
|||||||
|
|
||||||
_painLevel = _unit getvariable [QGVAR(pain), 0];
|
_painLevel = _unit getvariable [QGVAR(pain), 0];
|
||||||
_unit setvariable [QGVAR(pain), _painLevel + _painToAdd];
|
_unit setvariable [QGVAR(pain), _painLevel + _painToAdd];
|
||||||
|
TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getvariable QGVAR(pain), _unit getvariable QGVAR(openWounds),_woundsCreated);
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
private ["_bodyPartn", "_injuryTypeInfo", "_allInjuriesForDamageType", "_allPossibleInjuries", "_highestPossibleDamage", "_highestPossibleSpot", "_minDamage", "_openWounds", "_woundID", "_toAddInjury", "_painToAdd", "_bloodLoss", "_bodyPartNToAdd", "_classType", "_damageLevels", "_foundIndex", "_i", "_injury", "_maxDamage", "_pain", "_painLevel", "_selections", "_toAddClassID", "_woundsCreated"];
|
private ["_bodyPartn", "_injuryTypeInfo", "_allInjuriesForDamageType", "_allPossibleInjuries", "_highestPossibleDamage", "_highestPossibleSpot", "_minDamage", "_openWounds", "_woundID", "_toAddInjury", "_painToAdd", "_bloodLoss", "_bodyPartNToAdd", "_classType", "_damageLevels", "_foundIndex", "_i", "_injury", "_maxDamage", "_pain", "_painLevel", "_selections", "_toAddClassID", "_woundsCreated"];
|
||||||
params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamage"];
|
params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamage"];
|
||||||
|
TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage);
|
||||||
|
|
||||||
// Convert the selectionName to a number and ensure it is a valid selection.
|
// Convert the selectionName to a number and ensure it is a valid selection.
|
||||||
_bodyPartn = [_selectionName] call FUNC(selectionNameToNumber);
|
_bodyPartn = [_selectionName] call FUNC(selectionNameToNumber);
|
||||||
@ -130,3 +131,4 @@ if (count _woundsCreated > 0) then {
|
|||||||
|
|
||||||
_painLevel = _unit getvariable [QGVAR(pain), 0];
|
_painLevel = _unit getvariable [QGVAR(pain), 0];
|
||||||
_unit setvariable [QGVAR(pain), _painLevel + _painToAdd];
|
_unit setvariable [QGVAR(pain), _painLevel + _painToAdd];
|
||||||
|
TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD",_unit, _painLevel, _painToAdd, _unit getvariable QGVAR(pain), _unit getvariable QGVAR(openWounds),_woundsCreated);
|
||||||
|
Loading…
Reference in New Issue
Block a user