Changed postInit wound sync to playerChanged eventhandler.

This commit is contained in:
Glowbal 2015-04-03 00:04:41 +02:00
parent c174ccf396
commit b399768798

View File

@ -219,13 +219,16 @@ if (isNil QGVAR(level)) then {
if (USE_WOUND_EVENT_SYNC) then { if (USE_WOUND_EVENT_SYNC) then {
// broadcast injuries to JIP clients in a MP session // broadcast injuries to JIP clients in a MP session
if (isMultiplayer) then { if (isMultiplayer && hasInterface) then {
// We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them. ["playerChanged", {
if (hasInterface) then { EXPLODE_2_PVT(_this,_newPlayer,_oldPlayer);
{ if (alive _newPlayer) then {
[_x, player] call FUNC(requestWoundSync); // We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them.
}foreach units group player; {
}; [_x, _newPlayer] call FUNC(requestWoundSync);
}foreach units group player;
};
}] call EFUNC(common,addEventhandler);
}; };
}; };