Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repair - Skip destruction effects #8351

Merged
merged 1 commit into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions addons/repair/functions/fnc_setDamage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Arguments:
* 0: Local Vehicle to Damage <OBJECT>
* 1: Total Damage <NUMBER>
# 2: Use destruction effects <BOOL>
*
* Return Value:
* None
Expand All @@ -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.
Expand All @@ -31,7 +32,7 @@ if (_damageDisabled) then {
_vehicle allowDamage true;
};

_vehicle setDamage _damage;
_vehicle setDamage [_damage, _useEffects];

// restore original hitpoint damage values
{
Expand Down
4 changes: 2 additions & 2 deletions addons/repair/functions/fnc_setHitPointDamage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down