diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index c4bd23f779..707ec21b63 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -5,8 +5,8 @@ #define MAJOR 3 #define MINOR 0 -#define PATCHLVL 0 -#define BUILD 3 +#define PATCHLVL 1 +#define BUILD 0 #define VERSION MAJOR.MINOR.PATCHLVL.BUILD #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 8be2544515..07f5f7a16f 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -276,5 +276,5 @@ if (hasInterface) then { ["PlayerJip", { diag_log format["[ACE] JIP Medical init for player"]; [player] call FUNC(init); - }] call FUNC(addEventHandler); + }] call EFUNC(common,addEventHandler); }; diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index 73849dabb2..22eda8e07c 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -66,7 +66,7 @@ if (GVAR(level) < 2) then { }; }; - if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)} || !alive vehicle _unit) then { + if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)}) then { if ((_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)])) exitwith { _damageReturn = 0.9; }; @@ -96,6 +96,27 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW [{ [_this select 0, true] call FUNC(setUnconscious); }, [_unit]] call EFUNC(common,execNextFrame); + private "_delayedUnconsicous"; + _delayedUnconsicous = false; + if (vehicle _unit != _unit and {damage (vehicle _unit) >= 1}) then { + [_unit] call EFUNC(common,unloadPerson); + _delayedUnconsicous = true; + }; + + if (_damageReturn >= 0.9 && {_selection in ["", "head", "body"]}) exitWith { + if (_unit getvariable ["ACE_isUnconscious", false]) exitwith { + [_unit] call FUNC(setDead); + 0.89 + }; + if (_delayedUnconsicous) then { + [{ + [_this select 0, true] call FUNC(setUnconscious); + }, [_unit], 0.7, 0] call EFUNC(common,waitAndExec); + } else { + [{ + [_this select 0, true] call FUNC(setUnconscious); + }, [_unit]] call EFUNC(common,execNextFrame); + }; 0.89 }; _damageReturn min 0.89; diff --git a/addons/medical/functions/fnc_handleDamage_basic.sqf b/addons/medical/functions/fnc_handleDamage_basic.sqf index 7b308ad188..92c1f9f456 100644 --- a/addons/medical/functions/fnc_handleDamage_basic.sqf +++ b/addons/medical/functions/fnc_handleDamage_basic.sqf @@ -48,20 +48,28 @@ if (diag_frameno > (_unit getVariable [QGVAR(basic_frameNo), -3]) + 2) then { _unit setVariable [QGVAR(hitPoints), []]; _unit setVariable [QGVAR(damages), []]; _unit setVariable [QGVAR(structDamage), 0]; + + if (isnil {_unit getvariable QGVAR(structDamagePFH)}) then { // Assign orphan structural damage to torso - [{ - private ["_unit", "_damagesum"]; - _unit = _this select 0; - _damagesum = (_unit getHitPointDamage "HitHead") + - (_unit getHitPointDamage "HitBody") + - (_unit getHitPointDamage "HitLeftArm") + - (_unit getHitPointDamage "HitRightArm") + - (_unit getHitPointDamage "HitLeftLeg") + - (_unit getHitPointDamage "HitRightLeg"); - if (_damagesum < 0.06 and damage _unit > 0.06 and alive _unit) then { - _unit setHitPointDamage ["HitBody", damage _unit]; - }; - }, [_unit], 2, 0.1] call EFUNC(common,waitAndExecute); + [{ + private ["_unit", "_damagesum"]; + _unit = (_this select 0) select 0; + if (diag_tickTime - (_unit getvariable [QGVAR(structDamagePFH),-2]) >= 2) then { + _unit setVariable [QGVAR(structDamagePFH), nil]; + _damagesum = (_unit getHitPointDamage "HitHead") + + (_unit getHitPointDamage "HitBody") + + (_unit getHitPointDamage "HitLeftArm") + + (_unit getHitPointDamage "HitRightArm") + + (_unit getHitPointDamage "HitLeftLeg") + + (_unit getHitPointDamage "HitRightLeg"); + if (_damagesum < 0.06 and damage _unit > 0.06 and alive _unit) then { + _unit setHitPointDamage ["HitBody", damage _unit]; + }; + [(_this select 1)] call cba_fnc_removePerFrameHandler; + }; + }, 0, [_unit]] call CBA_fnc_addPerFrameHandler; + }; + _unit setVariable [QGVAR(structDamagePFH), diag_tickTime]; // Assign starting time or reset it }; _newDamage = _damage - (damage _unit); diff --git a/extensions/common/targetver.h b/extensions/common/targetver.h index 10d2cf1c18..14dae4e96f 100644 --- a/extensions/common/targetver.h +++ b/extensions/common/targetver.h @@ -6,4 +6,4 @@ #include #else -#endif \ No newline at end of file +#endif diff --git a/mod.cpp b/mod.cpp index b878c76a6d..f9ae718fdc 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,8 +1,8 @@ -name = "Advanced Combat Environment 3.0.0"; +name = "Advanced Combat Environment 3.0.1"; picture = "logo_ace3_ca.paa"; actionName = "GitHub"; action = "https://github.com/acemod/ACE3"; -description = "ACE3 - Version 3.0.0"; +description = "ACE3 - Version 3.0.1"; logo = "logo_ace3_ca.paa"; logoOver = "logo_ace3_ca.paa"; tooltip = "ACE3"; diff --git a/optionals/compat_rhs_usf3/CfgWeapons.hpp b/optionals/compat_rhs_usf3/CfgWeapons.hpp index dbe00bbd5f..33b16876e2 100644 --- a/optionals/compat_rhs_usf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_usf3/CfgWeapons.hpp @@ -95,4 +95,14 @@ class CfgWeapons lockingTargetSound[] = {"",0,1}; lockedTargetSound[] = {"",0,1}; }; + + class rhs_weap_fgm148 : launch_O_Titan_F { + ace_javelin_enabled = 1; + weaponInfoType = "ACE_RscOptics_javelin"; + modelOptics = "\z\ace\addons\javelin\data\reticle_titan.p3d"; + + canLock = 0; + lockingTargetSound[] = {"",0,1}; + lockedTargetSound[] = {"",0,1}; + }; }; \ No newline at end of file