Update player_checkStealth.sqf

Several functions check if the player is inside a building including the new weather functions. The DayZ Mod devs introduced the dayz_inside variable in fn_temperatur but never finished the code to utilize it. Since player_checkStealth is called continuously in the scheduler we can set the variable here and use it in other functions.
This commit is contained in:
worldwidesorrow
2020-07-14 16:07:38 -05:00
committed by GitHub
parent aae14af4e2
commit 34e1437641

View File

@@ -119,9 +119,8 @@ if (_speed > 5) then {
*/
//Are they inside a building
_building = nearestObject [getPosATL (vehicle player), "Building"];
_isPlayerInside = [(vehicle player),_building] call fnc_isInsideBuilding;
if (_isPlayerInside) then {
dayz_inside = [(vehicle player)] call fnc_isInsideBuilding;
if (dayz_inside) then {
_initial = 5;
};
@@ -130,4 +129,4 @@ _audial = round(_speed * dayz_surfaceNoise * _scaleMvmt * _scaleSound);
if ((_audial > DAYZ_disAudial) or ((time - dayz_firedCooldown) > 0.3)) then {
DAYZ_disAudial = _audial;
};
DAYZ_disVisual = (round((_initial + (_speed * 3)) * _scalePose * _scaleLight)) * 1.5;
DAYZ_disVisual = (round((_initial + (_speed * 3)) * _scalePose * _scaleLight)) * 1.5;