mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
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:
@@ -119,9 +119,8 @@ if (_speed > 5) then {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//Are they inside a building
|
//Are they inside a building
|
||||||
_building = nearestObject [getPosATL (vehicle player), "Building"];
|
dayz_inside = [(vehicle player)] call fnc_isInsideBuilding;
|
||||||
_isPlayerInside = [(vehicle player),_building] call fnc_isInsideBuilding;
|
if (dayz_inside) then {
|
||||||
if (_isPlayerInside) then {
|
|
||||||
_initial = 5;
|
_initial = 5;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -130,4 +129,4 @@ _audial = round(_speed * dayz_surfaceNoise * _scaleMvmt * _scaleSound);
|
|||||||
if ((_audial > DAYZ_disAudial) or ((time - dayz_firedCooldown) > 0.3)) then {
|
if ((_audial > DAYZ_disAudial) or ((time - dayz_firedCooldown) > 0.3)) then {
|
||||||
DAYZ_disAudial = _audial;
|
DAYZ_disAudial = _audial;
|
||||||
};
|
};
|
||||||
DAYZ_disVisual = (round((_initial + (_speed * 3)) * _scalePose * _scaleLight)) * 1.5;
|
DAYZ_disVisual = (round((_initial + (_speed * 3)) * _scalePose * _scaleLight)) * 1.5;
|
||||||
|
|||||||
Reference in New Issue
Block a user