More cleanup

This commit is contained in:
johnb432 2024-07-01 19:15:37 +02:00
parent b5205c1fd0
commit 471d33ae32

View File

@ -3,17 +3,12 @@
[QGVAR(moveCorpse), { [QGVAR(moveCorpse), {
params ["_corpse", "_dir", "_posATL"]; params ["_corpse", "_dir", "_posATL"];
_posATL params ["_xPos", "_yPos", "_zPos"];
if (isNull _corpse) exitWith {}; if (isNull _corpse) exitWith {};
private _currentPos = getPosATL _corpse;
// Check if the corpse is already close to the target // Check if the corpse is already close to the target
// If so, don't teleport // If so, don't teleport
if !( if ((getPosATL _corpse) distance _posATL > 0.25) then {
_currentPos distance _posATL > 0.25
) then {
// Set direction before position // Set direction before position
_corpse setDir _dir; _corpse setDir _dir;