From 4ebbc289483f874bfd26dfa7657913ea6a073c1f Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Thu, 18 Jan 2024 02:59:08 -0600 Subject: [PATCH] Makes sure spall power square root is positive and also we don't produce fragments when for some reason the round accelerates. --- addons/frag/functions/fnc_doSpall.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/frag/functions/fnc_doSpall.sqf b/addons/frag/functions/fnc_doSpall.sqf index 4f86f801af..d2ac3e019a 100644 --- a/addons/frag/functions/fnc_doSpall.sqf +++ b/addons/frag/functions/fnc_doSpall.sqf @@ -52,7 +52,7 @@ private _vel = if (alive _projectile) then { [0, 0, 0]; }; -private _velocityChange = vectorMagnitude _lastVelocity - vectorMagnitude _vel; +private _velocityChange = 0 max (vectorMagnitude _lastVelocity - vectorMagnitude _vel); /* * This is all fudge factor since real spalling is too complex for calculation. * There are two terms. The first is from round impact, taking a quasi scale