Make unrelated things not explode when repairing (#8351)

_useEffects was probably inverted. Makes ERA/SLAT not explode when repairing unrelated hitpoints. See #7452.
This commit is contained in:
GhostIsSpooky 2021-10-05 14:27:55 -03:00 committed by GitHub
parent 1e30e1371e
commit 5fbbb34d2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -6,6 +6,7 @@
* Arguments:
* 0: Local Vehicle to Damage <OBJECT>
* 1: Total Damage <NUMBER>
# 2: Use destruction effects <BOOL>
*
* Return Value:
* None
@ -16,7 +17,7 @@
* Public: No
*/
params ["_vehicle", "_damage"];
params ["_vehicle", "_damage", ["_useEffects", false]];
TRACE_2("params",_vehicle,_damage);
// can't execute all commands if the vehicle isn't local. exit here.
@ -31,7 +32,7 @@ if (_damageDisabled) then {
_vehicle allowDamage true;
};
_vehicle setDamage _damage;
_vehicle setDamage [_damage, _useEffects];
// restore original hitpoint damage values
{

View File

@ -8,7 +8,7 @@
* 0: Local Vehicle to Damage <OBJECT>
* 1: Selected hitpoint INDEX <NUMBER>
* 2: Total Damage <NUMBER>
* 3: Skip destruction effects <BOOL>
* 3: Use destruction effects <BOOL>
*
* Return Value:
* None
@ -19,7 +19,7 @@
* Public: No
*/
params ["_vehicle", "_hitPointIndex", "_hitPointDamage", ["_useEffects", true]];
params ["_vehicle", "_hitPointIndex", "_hitPointDamage", ["_useEffects", false]];
TRACE_4("params",_vehicle,typeOf _vehicle,_hitPointIndex,_hitPointDamage);
// can't execute all commands if the vehicle isn't local. exit here.