Skip to content

Commit ffd0465

Browse files
committed
style: consistent vehicle resolution pattern across fired handlers
Use local variable + if/then/else in eh_firedMan to match eh_fired_client.
1 parent 723ab0f commit ffd0465

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

addons/recorder/fnc_eh_firedMan.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ params ["_firer", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_project
4646
private _controlledUnit = missionNamespace getVariable ["bis_fnc_moduleRemoteControl_unit", objNull];
4747
if (!isNull _controlledUnit && {_controlledUnit getVariable ["BIS_fnc_moduleRemoteControl_owner", objNull] isEqualTo _firer}) then {
4848
_firer = _controlledUnit;
49-
_vehicle = vehicle _controlledUnit;
50-
if (_vehicle isEqualTo _controlledUnit) then { _vehicle = objNull; };
49+
private _controlledVehicle = vehicle _controlledUnit;
50+
_vehicle = if (_controlledVehicle isEqualTo _controlledUnit) then {objNull} else {_controlledVehicle};
5151
};
5252

5353
// not sent in ACE Throwing events

0 commit comments

Comments
 (0)