From eda865f377aee85305efb17b3fe11c926227a825 Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Thu, 28 Mar 2024 19:05:41 -0500 Subject: [PATCH] Randomized random frag directions --- addons/frag/functions/fnc_doFragRandom.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/frag/functions/fnc_doFragRandom.sqf b/addons/frag/functions/fnc_doFragRandom.sqf index 61328aa141..81b1f49499 100644 --- a/addons/frag/functions/fnc_doFragRandom.sqf +++ b/addons/frag/functions/fnc_doFragRandom.sqf @@ -41,7 +41,8 @@ _maxFragCount = switch (true) do { // Spawn the fragment spawner private _fragSpawner = createVehicle [_type + _maxFragCount + _hMode, ASLToATL _posASL, [], 0, "CAN_COLLIDE"]; -_fragSpawner setVectorDirandUp [[0,0,1], [1,0,0]]; +private _randDir = random 360; +_fragSpawner setVectorDirandUp [[0,0,-1], [cos _randDir, sin _randDir,0]]; _fragSpawner setVelocity _fragVelocity; _fragSpawner setShotParents _shotParents;