more server_monitor changes

Forgot to include this with the previous commit
This commit is contained in:
icomrade
2016-08-17 15:20:08 -04:00
parent 78665f3ed7
commit 488952e3b6

View File

@@ -155,10 +155,10 @@ if (_status == "ObjectStreamStart") then {
if (_nonCollide) then {
_object = createVehicle [_type, [0,0,0], [], 0, "NONE"];
} else {
_object = _type createVehicle [0,0,0]; //slightly more than 2x faster than createvehicle array
_object = _type createVehicle [0,0,0]; //more than 2x faster than createvehicle array
};
_object setPosATL _pos;
_object setDir _dir;
_object setPosATL _pos;
_object setDamage _damage;
if (_vecExists) then {
_object setVectorDirAndUp _vector;
@@ -224,7 +224,7 @@ if (_status == "ObjectStreamStart") then {
_isAir = _object isKindOf "Air";
{
_selection = _x select 0;
_dam = if ((_selection in dayZ_explosiveParts) && {!_isAir}) then {(_x select 1) min 0.8;} else {_x select 1;};
_dam = if (!_isAir && {_selection in dayZ_explosiveParts}) then {(_x select 1) min 0.8;} else {_x select 1;};
_strH = "hit_" + (_selection);
_object setHit[_selection,_dam];
_object setVariable [_strH,_dam,true];
@@ -237,8 +237,6 @@ if (_status == "ObjectStreamStart") then {
_object call fnc_veh_ResetEH;
if (_ownerID != "0" && {!(_object isKindOf "Bicycle")}) then {_object setVehicleLock "locked";};
_serverVehicleCounter set [count _serverVehicleCounter,_type]; // total each vehicle
} else {
_object enableSimulation true;
};
} else {
// Fix for leading zero issues on safe codes after restart
@@ -268,6 +266,8 @@ if (_status == "ObjectStreamStart") then {
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
};
_object setVariable ["OEMPos",_pos,true]; // used for inplace upgrades and lock/unlock of safe
} else {
_object enableSimulation true;
};
if (_isDZ_Buildable || {_isTrapItem}) then {
//Use inventory for owner/clan info and traps armed state
@@ -290,8 +290,6 @@ if (_status == "ObjectStreamStart") then {
} foreach _inventory;
if (_maintenanceMode) then { _object setVariable ["Maintenance", true, true]; _object setVariable ["MaintenanceVars", _maintenanceModeVars]; };
} else {
_object enableSimulation true;
};
};
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object]; //Monitor the object