object_setFixServer -> fnc_veh_setFixServer

Fnc_veh_handleRepair is a new version of fnc_veh_setFixServer with extra
handling. It is used in salvage and some other scripts, but not
server_monitor.
This commit is contained in:
ebaydayz
2016-03-22 16:34:08 -04:00
parent cc64d2e7fb
commit debb714277
10 changed files with 227 additions and 259 deletions

View File

@@ -5,7 +5,7 @@ _unit = _obj select 0;
_ammo = _obj select 4;
_projectile = _obj select 6;
waituntil {!isnil "dayz_sunRise"};
waituntil {!isNil "dayz_sunRise"};
_projectile = nearestObject [_unit,_ammo];
_endPos = getPosATL _projectile;
@@ -13,7 +13,7 @@ _endPos = getPosATL _projectile;
_doWait = true;
while {_doWait} do {
_vel = (velocity _projectile) distance [0,0,0];
if (!(alive _projectile)) then {_doWait = false};
if !(alive _projectile) then {_doWait = false};
if (_vel < 0.1) then {_doWait = false};
_endPos = getPosATL _projectile;
uiSleep 0.01;
@@ -25,11 +25,7 @@ if (_ammo isKindOf "ChemLight") then {
_distance = 10;
};
if (_ammo isKindOf "RoadFlare") then {
if ((daytime < (24 - dayz_sunRise)) and (daytime > dayz_sunRise)) then {
_distance = 30;
} else {
_distance = 60;
};
_distance = if ((daytime < (24 - dayz_sunRise)) && (daytime > dayz_sunRise)) then {30} else {60};
};
[_unit,_distance,false,_endPos] call player_alertZombies;