mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix error with out of bounds blood loss
This commit is contained in:
parent
5a19d4884b
commit
a913054b57
@ -2,9 +2,9 @@
|
||||
#define COMPONENT_BEAUTIFIED Medical Core
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define CBA_DEBUG_SYNCHRONOUS
|
||||
#define DEBUG_MODE_FULL
|
||||
#define DISABLE_COMPILE_CACHE
|
||||
#define CBA_DEBUG_SYNCHRONOUS
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_MEDICAL
|
||||
|
@ -21,6 +21,7 @@ if (GVAR(enabledFor) == 1 && {!isPlayer _unit || {_unit == ACE_player}}) exitWit
|
||||
|
||||
private _lastTime = _unit getVariable [QGVAR(lastTime), -10];
|
||||
private _bloodLoss = (if (GVAR(useAceMedical)) then {([_unit] call EFUNC(medical,getBloodLoss)) * 2.5} else {getDammage _unit * 2}) min 6;
|
||||
TRACE_1("",_bloodLoss);
|
||||
|
||||
if ((CBA_missionTime - _lastTime) + _bloodLoss >= 8 + random 2) then {
|
||||
_unit setVariable [QGVAR(lastTime), CBA_missionTime];
|
||||
@ -33,6 +34,6 @@ if ((CBA_missionTime - _lastTime) + _bloodLoss >= 8 + random 2) then {
|
||||
];
|
||||
_position set [2, 0];
|
||||
|
||||
private _bloodDrop = ["blooddrop_1", "blooddrop_2", "blooddrop_3", "blooddrop_4"] select floor (_bloodLoss max 3);
|
||||
private _bloodDrop = ["blooddrop_1", "blooddrop_2", "blooddrop_3", "blooddrop_4"] select floor (_bloodLoss min 3);
|
||||
[_bloodDrop, _position, getDir _unit] call FUNC(createBlood);
|
||||
};
|
||||
|
@ -2,9 +2,9 @@
|
||||
#define COMPONENT_BEAUTIFIED Medical Blood
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DEBUG_ENABLED_MEDICAL_BLOOD
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define CBA_DEBUG_SYNCHRONOUS
|
||||
#define DEBUG_ENABLED_MEDICAL_BLOOD
|
||||
#define DISABLE_COMPILE_CACHE
|
||||
#define CBA_DEBUG_SYNCHRONOUS
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_MEDICAL_BLOOD
|
||||
|
Loading…
Reference in New Issue
Block a user