mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix null ace_player from early call to addPlayerEH
This commit is contained in:
parent
5a83659136
commit
18153b0451
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user