From 2db9e7759038f9d7a42f0e5cf6a7a91916d48291 Mon Sep 17 00:00:00 2001 From: Vdauphin Date: Sat, 16 Nov 2024 15:57:10 +0100 Subject: [PATCH] fix delay of _restingPlace --- .../core/fnc/side/massacre.sqf | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/side/massacre.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/side/massacre.sqf index d65adbd9c..915ec702c 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/side/massacre.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/side/massacre.sqf @@ -112,12 +112,15 @@ for "_i" from 1 to (2 + round random 3) do { _thisArgs deleteAt (_thisArgs find _patient); private _taskID = _patient getVariable ["btc_rep_playerKiller", ""]; if (_isGrave) then { - private _church = nearestTerrainObjects [_restingPlace, ["CHURCH", "CHAPEL"], 50]; - if (_church isEqualTo []) then { - [_taskID, "FAILED"] call BIS_fnc_taskSetState; - } else { - [_taskID, "SUCCEEDED"] call BIS_fnc_taskSetState; - }; + [{ + params ["_restingPlace", "_taskID"]; + private _church = nearestTerrainObjects [_restingPlace, ["CHURCH", "CHAPEL"], 50]; + if (_church isEqualTo []) then { + [_taskID, "FAILED"] call BIS_fnc_taskSetState; + } else { + [_taskID, "SUCCEEDED"] call BIS_fnc_taskSetState; + }; + }, [_bodyBag, _taskID], 0.2] call CBA_fnc_waitAndExecute; } else { _thisArgs pushBack _bodyBag; [_taskID, _bodyBag] call BIS_fnc_taskSetDestination;