Skip to content
Merged
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
4 changes: 3 additions & 1 deletion addons/events/fnc_addPlayerEventHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Author:
#include "script_component.hpp"
SCRIPT(addPlayerEventHandler);

if (!hasInterface) exitWith {-1};

params [["_type", "", [""]], ["_function", {}, [{}]]];

_type = toLower _type;
Expand Down Expand Up @@ -82,8 +84,8 @@ if (_id != -1) then {
GVAR(playerEHInfo) pushBack addMissionEventHandler ["EachFrame", {
private _player = call CBA_fnc_currentUnit;
if !(_player isEqualTo GVAR(oldUnit)) then {
[QGVAR(unitEvent), [_player, GVAR(oldUnit)]] call CBA_fnc_localEvent;
GVAR(oldUnit) = _player;
[QGVAR(unitEvent), [_player]] call CBA_fnc_localEvent;
};

private _data = currentWeapon _player;
Expand Down