mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Bundle fire damage into larger chunks (#4223)
This commit is contained in:
parent
7220d0ee5d
commit
1c5761f845
@ -9,9 +9,6 @@
|
|||||||
* 3: Shooter <OBJECT>
|
* 3: Shooter <OBJECT>
|
||||||
* 4: Projectile <STRING>
|
* 4: Projectile <STRING>
|
||||||
* 5: Hit part index of the hit point <NUMBER>
|
* 5: Hit part index of the hit point <NUMBER>
|
||||||
* 6: Current damage to be returned <NUMBER>
|
|
||||||
*
|
|
||||||
* //On 1.63 dev:
|
|
||||||
* 6: Shooter? <OBJECT>
|
* 6: Shooter? <OBJECT>
|
||||||
* 7: Current damage to be returned <NUMBER>
|
* 7: Current damage to be returned <NUMBER>
|
||||||
*
|
*
|
||||||
@ -23,12 +20,23 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfProjectile", "_hitPointNumber", "_newDamage"];
|
params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfProjectile", "_hitPointNumber", "", "_newDamage"];
|
||||||
|
|
||||||
//Temp fix for 1.63 handleDamage changes
|
// For burning damage we will get a ton of very small hits of damage; they are too small to create any wounds
|
||||||
if (_newDamage isEqualType objNull) then {
|
// Save them up in a variable and run when it is over a noticable amount
|
||||||
_newDamage = _this select 7;
|
|
||||||
};
|
if ((_typeOfProjectile == "") && {_newDamage < 0.15} && {
|
||||||
|
_newDamage = _newDamage + (_unit getVariable [QGVAR(trivialDamage), 0]);
|
||||||
|
if (_newDamage > 0.15) then {
|
||||||
|
// if the new sum is large enough, reset variable and continue with it added in
|
||||||
|
_unit setVariable [QGVAR(trivialDamage), 0];
|
||||||
|
false
|
||||||
|
} else {
|
||||||
|
// otherwise just save the new sum into the variable and exit
|
||||||
|
_unit setVariable [QGVAR(trivialDamage), _newDamage];
|
||||||
|
true // exit
|
||||||
|
};
|
||||||
|
}) exitWith {};
|
||||||
|
|
||||||
private _part = [_selectionName] call FUNC(selectionNameToNumber);
|
private _part = [_selectionName] call FUNC(selectionNameToNumber);
|
||||||
if (_part < 0) exitWith {};
|
if (_part < 0) exitWith {};
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamage"];
|
params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamage"];
|
||||||
TRACE_6("ACE_DEBUG: HandleDamage Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage);
|
TRACE_6("ACE_DEBUG: HandleDamage Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage);
|
||||||
|
|
||||||
|
if (_typeOfDamage == "") then {_typeOfDamage = "unknown";};
|
||||||
|
|
||||||
// Administration for open wounds and ids
|
// Administration for open wounds and ids
|
||||||
private _openWounds = _unit getVariable[QGVAR(openWounds), []];
|
private _openWounds = _unit getVariable[QGVAR(openWounds), []];
|
||||||
private _woundID = _unit getVariable[QGVAR(lastUniqueWoundID), 1];
|
private _woundID = _unit getVariable[QGVAR(lastUniqueWoundID), 1];
|
||||||
|
Loading…
Reference in New Issue
Block a user