Fix null ace_player from early call to addPlayerEH

This commit is contained in:
PabstMirror 2016-08-23 22:24:59 -05:00
parent 5a83659136
commit 18153b0451

View File

@ -295,6 +295,13 @@ enableCamShake true;
// Set up numerous eventhanders for player controlled units
//////////////////////////////////////////////////
// It is possible that CBA_fnc_addPlayerEventHandler has allready been called and run
// We will NOT get any events for the initial state, so manually set ACE_player
if (!isNull (missionNamespace getVariable ["cba_events_oldUnit", objNull])) then {
INFO("CBA_fnc_addPlayerEventHandler has already run - manually setting ace_player");
ACE_player = cba_events_oldUnit;
};
// "playerChanged" event
["unit", {
ACE_player = (_this select 0);