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 {
// broadcast injuries to JIP clients in a MP session
if (isMultiplayer) then {
// We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them.
if (hasInterface) then {
{
[_x, player] call FUNC(requestWoundSync);
}foreach units group player;
};
if (isMultiplayer && hasInterface) then {
["playerChanged", {
EXPLODE_2_PVT(_this,_newPlayer,_oldPlayer);
if (alive _newPlayer) then {
// We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them.
{
[_x, _newPlayer] call FUNC(requestWoundSync);
}foreach units group player;
};
}] call EFUNC(common,addEventhandler);
};
};