From 2cf5a523a326cf4b6566f55529182d7b4d80424d Mon Sep 17 00:00:00 2001 From: A Man Date: Sat, 22 May 2021 10:48:39 +0200 Subject: [PATCH] Correct zombies chem light aggro at daytime --- SQF/dayz_code/compile/player_throwObject.sqf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SQF/dayz_code/compile/player_throwObject.sqf b/SQF/dayz_code/compile/player_throwObject.sqf index c699b8414..2585786fa 100644 --- a/SQF/dayz_code/compile/player_throwObject.sqf +++ b/SQF/dayz_code/compile/player_throwObject.sqf @@ -21,13 +21,14 @@ while {_doWait} do { _distance = parseNumber format["%1",(getArray (configFile >> "CfgAmmo" >> _ammo >> "soundHit") select 3)]; -if (_ammo isKindOf "ChemLight" && {daytime > 18 || daytime < 7}) exitwith { - _distance = 10; - [_unit,_distance,false,_endPos] call player_alertZombies; +if (_ammo isKindOf "ChemLight") exitwith { + if ((daytime > (24 - dayz_sunRise)) || (daytime < dayz_sunRise)) then { + [_unit,10,false,_endPos] call player_alertZombies; + }; }; if (_ammo isKindOf "RoadFlare") then { - _distance = [60,30] select ((daytime < (24 - dayz_sunRise)) && {daytime > dayz_sunRise}) + _distance = [60,30] select ((daytime < (24 - dayz_sunRise)) && {daytime > dayz_sunRise}); }; [_unit,_distance,false,_endPos] call player_alertZombies;