fixed postInit depending on setting

This commit is contained in:
Glowbal 2015-03-22 15:16:42 +01:00
parent be9c09b605
commit 8b4c0c0e36

View File

@ -218,19 +218,21 @@ if (isNil QGVAR(level)) then {
}, 0, []] call CBA_fnc_addPerFrameHandler;
// broadcast injuries to JIP clients in a MP session
if (isMultiplayer and GVAR(level) >= 2) then {
if (isMultiplayer) then {
[QGVAR(onPlayerConnected), "onPlayerConnected", {
if (isNil QGVAR(InjuredCollection)) then {
GVAR(InjuredCollection) = [];
};
if (GVAR(level) >= 2) then {
if (isNil QGVAR(InjuredCollection)) then {
GVAR(InjuredCollection) = [];
};
{
_unit = _x;
_openWounds = _unit getvariable [QGVAR(openWounds), []];
{
["medical_propagateWound", [_id], [_unit, _x]] call EFUNC(common,targetEvent);
}foreach _openWounds;
}foreach GVAR(InjuredCollection);
_unit = _x;
_openWounds = _unit getvariable [QGVAR(openWounds), []];
{
["medical_propagateWound", [_id], [_unit, _x]] call EFUNC(common,targetEvent);
}foreach _openWounds;
}foreach GVAR(InjuredCollection);
};
}, []] call BIS_fnc_addStackedEventHandler;
};