Skip to content

Commit

Permalink
Fix for bugged PlayerViewChanged event (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored and commy2 committed Feb 18, 2017
1 parent be717f6 commit 5b272ce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions addons/events/fnc_addPlayerEventHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ if (_id != -1) then {
};
};

// Fix for problems with PlayerViewChanged eh not always firing on vehicle switch on dedicated
// Look into removing this block if event is fixed
_data = vehicle _player;
if !(_data isEqualTo GVAR(oldVehicle)) then {
TRACE_1("Using fallback polling event for vehicle change",_data);
GVAR(oldVehicle) = _data;
[QGVAR(vehicleEvent), [_player, _data]] call CBA_fnc_localEvent;
};

_data = _player call CBA_fnc_turretPath;
if !(_data isEqualTo GVAR(oldTurret)) then {
GVAR(oldTurret) = _data;
Expand Down

0 comments on commit 5b272ce

Please sign in to comment.