mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
stash
This commit is contained in:
parent
9d728f326c
commit
dddb34a97d
@ -4,6 +4,10 @@ class CfgVehicles {
|
||||
class CAManBase: Man {
|
||||
// General
|
||||
class HitPoints {
|
||||
// class HitNeck;
|
||||
// class HitHead: HitNeck {
|
||||
// depends = "HitFace max HitNeck max ACE_HDBracket";
|
||||
// };
|
||||
ADD_ACE_HITPOINTS(1,1);
|
||||
};
|
||||
};
|
||||
|
@ -17,6 +17,7 @@
|
||||
#define HIT_STRUCTURAL QGVAR($#structural)
|
||||
|
||||
params ["_unit", "_selection", "_damage", "_shooter", "_ammo", "_hitPointIndex", "_instigator", "_hitpoint"];
|
||||
diag_log text format ["HD - %1 - %2", diag_frameno, _this];
|
||||
|
||||
// HD sometimes triggers for remote units - ignore.
|
||||
if !(local _unit) exitWith {nil};
|
||||
@ -137,7 +138,7 @@ if (_hitPoint isEqualTo "ace_hdbracket") exitWith {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xxx = false;
|
||||
// No wounds for minor damage
|
||||
if (_receivedDamage > 1E-3) then {
|
||||
[QEGVAR(medical,woundReceived), [_unit, _woundedHitPoint, _receivedDamage, _shooter, _ammo]] call CBA_fnc_localEvent;
|
||||
@ -154,7 +155,17 @@ if (_hitPoint isEqualTo "ace_hdbracket") exitWith {
|
||||
QGVAR($HitLeftArm),QGVAR($HitRightArm),QGVAR($HitLeftLeg),QGVAR($HitRightLeg)
|
||||
];
|
||||
|
||||
0
|
||||
if (xxx) then {
|
||||
xxx = nil;
|
||||
systemChat "9";
|
||||
// _unit setHit ["head", 1];
|
||||
_unit setDamage [1, true];
|
||||
5
|
||||
} else {
|
||||
xxx = nil;
|
||||
systemChat "0";
|
||||
0
|
||||
};
|
||||
};
|
||||
|
||||
// Drowning doesn't fire the EH for each hitpoint so the "ace_hdbracket" code never runs
|
||||
|
@ -1,6 +1,6 @@
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
#define DISABLE_COMPILE_CACHE
|
||||
#define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#define ALL_BODY_PARTS ["head", "body", "leftarm", "rightarm", "leftleg", "rightleg"]
|
||||
#define ALL_SELECTIONS ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
[{
|
||||
// [{
|
||||
params ["_unit"];
|
||||
|
||||
// TODO: Probably also needs additional logic to deal with edge cases
|
||||
@ -25,4 +25,4 @@
|
||||
|
||||
private _deathReason = _unit getVariable [QGVAR(deathReason), nil];
|
||||
[_unit, _deathReason] call EFUNC(medical_status,setDead);
|
||||
}, _this] call CBA_fnc_execNextFrame;
|
||||
// }, _this] call CBA_fnc_execNextFrame;
|
||||
|
@ -14,13 +14,20 @@
|
||||
*/
|
||||
|
||||
params ["_unit", ["_reason", "unknown"]];
|
||||
TRACE_2("setDead",_unit,_reason);
|
||||
|
||||
// No heart rate or blood pressure to measure when dead
|
||||
_unit setVariable [VAR_HEART_RATE, 0, true];
|
||||
_unit setVariable [VAR_BLOOD_PRESS, [0, 0], true];
|
||||
|
||||
// Kill the unit without changing visual apperance
|
||||
[_unit, 1] call EFUNC(medical_engine,setStructuralDamage);
|
||||
if (isNil "xxx") then {
|
||||
TRACE_1("normal kill",_unit);
|
||||
[_unit, 1] call EFUNC(medical_engine,setStructuralDamage);
|
||||
} else {
|
||||
TRACE_1("normal kill",_unit);
|
||||
xxx = true;
|
||||
};
|
||||
|
||||
private _lastShooter = _unit getVariable [QEGVAR(medical,lastDamageSource), objNull];
|
||||
private _lastInstigator = _unit getVariable [QEGVAR(medical,lastInstigator), objNull];
|
||||
|
@ -2,9 +2,9 @@
|
||||
#define COMPONENT_BEAUTIFIED Medical Status
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
#define DEBUG_MODE_FULL
|
||||
#define DISABLE_COMPILE_CACHE
|
||||
#define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_MEDICAL_STATUS
|
||||
#define DEBUG_MODE_FULL
|
||||
|
Loading…
Reference in New Issue
Block a user