From 34e1437641b7ee1544a2fe3e3847339112e411a3 Mon Sep 17 00:00:00 2001 From: worldwidesorrow Date: Tue, 14 Jul 2020 16:07:38 -0500 Subject: [PATCH] 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. --- SQF/dayz_code/compile/player_checkStealth.sqf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SQF/dayz_code/compile/player_checkStealth.sqf b/SQF/dayz_code/compile/player_checkStealth.sqf index b9e119de6..d00e8d4c3 100644 --- a/SQF/dayz_code/compile/player_checkStealth.sqf +++ b/SQF/dayz_code/compile/player_checkStealth.sqf @@ -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; \ No newline at end of file +DAYZ_disVisual = (round((_initial + (_speed * 3)) * _scalePose * _scaleLight)) * 1.5;