unused dayz_disco variables commented out
player sync already does 10m nearby  gear update so only perform if no
sync was.
moved dayz_recordlogin to under !isNull _object check to prevent db call
if player isnull.
This commit is contained in:
[VB]AWOL
2013-10-27 09:27:45 -05:00
parent 668cd0c1c4
commit b19d85d32d
10 changed files with 24 additions and 17 deletions

View File

@@ -30,15 +30,15 @@ if ((_timeout - time) > 0) then {
[nil,nil,"per",rTITLETEXT,_message,"PLAIN DOWN"] call RE;
};
diag_log format["DISCONNECT: %1 (%2) Object: %3, _characterID: %4", _playerName,_playerID,_object,_characterID];
_id = [_playerID,_characterID,2] spawn dayz_recordLogin;
dayz_disco = dayz_disco - [_playerID];
//dayz_disco = dayz_disco - [_playerID];
if (!isNull _object) then {
//Update Vehicle
{ [_x,"gear"] call server_updateObject } foreach
(nearestObjects [getPosATL _object, dayz_updateObjects, 10]);
diag_log format["DISCONNECT: %1 (%2) Object: %3, _characterID: %4", _playerName,_playerID,_object,_characterID];
_id = [_playerID,_characterID,2] spawn dayz_recordLogin;
if (alive _object) then {
_isplayernearby = (DZE_BackpackGuard and!_invehicle and ({isPlayer _x} count (_object nearEntities ["AllVehicles", 5]) > 1));
[_object,(magazines _object),true,true,_isplayernearby] call server_playerSync;
@@ -53,5 +53,10 @@ if (!isNull _object) then {
_myGroup = group _object;
deleteVehicle _object;
deleteGroup _myGroup;
} else {
//Update Vehicle
{
[_x,"gear"] call server_updateObject;
} foreach (nearestObjects [getPosATL _object, dayz_updateObjects, 10]);
};
};