diff --git a/addons/frag/ACE_Settings.hpp b/addons/frag/ACE_Settings.hpp
index 84bba326f0..f488e7949e 100644
--- a/addons/frag/ACE_Settings.hpp
+++ b/addons/frag/ACE_Settings.hpp
@@ -11,6 +11,12 @@ class ACE_Settings {
typeName = "BOOL";
value = 0;
};
+ class GVAR(ReflectionsEnabled) {
+ displayName = CSTRING(EnableReflections);
+ description = CSTRING(EnableReflections_Desc);
+ typeName = "BOOL";
+ value = 0;
+ };
class GVAR(maxTrack) {
displayName = CSTRING(MaxTrack);
description = CSTRING(MaxTrack_Desc);
@@ -23,7 +29,7 @@ class ACE_Settings {
typeName = "SCALAR";
value = 50;
};
-
+
class GVAR(EnableDebugTrace) {
displayName = CSTRING(EnableDebugTrace);
description = CSTRING(EnableDebugTrace_Desc);
diff --git a/addons/frag/functions/fnc_findReflections.sqf b/addons/frag/functions/fnc_findReflections.sqf
index 7f8fd2a13c..5e069ddd58 100644
--- a/addons/frag/functions/fnc_findReflections.sqf
+++ b/addons/frag/functions/fnc_findReflections.sqf
@@ -3,6 +3,7 @@
private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange", "_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", "_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec", "_zAng"];
+BEGIN_COUNTER(fnc_findReflections);
_params = _this select 0;
_pos = _params select 0;
_explosiveInfo = _params select 1;
@@ -124,3 +125,4 @@ if(_zIndex < 5) then {
[DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
};
+END_COUNTER(fnc_findReflections);
diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf
index 3507a7ab6e..8c72ae8bac 100644
--- a/addons/frag/functions/fnc_frago.sqf
+++ b/addons/frag/functions/fnc_frago.sqf
@@ -8,6 +8,7 @@
if(!isServer) exitWith { };
+BEGIN_COUNTER(frago);
// _startTime = ACE_diagTime;
private ["_startTime", "_round", "_lastPos", "_lastVel", "_shellType", "_gun", "_fragTypes", "_warn", "_atlPos", "_isArmed", "_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom", "_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_boundingBox", "_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir", "_currentCount", "_count", "_vecVar", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount", "_sectorSize", "_sectorOffset", "_i", "_randomDir", "_endTime", "_target"];
@@ -108,7 +109,9 @@ _fragArcs set[360, 0];
#endif
_doRandom = true;
if(_isArmed && (count _objects) > 0) then {
- [_lastPos, _shellType] call FUNC(doReflections);
+ if (GVAR(ReflectionsEnabled)) then {
+ [_lastPos, _shellType] call FUNC(doReflections);
+ };
{
//if(random(1) > 0.5) then {
_target = _x;
@@ -212,3 +215,4 @@ if(_isArmed && (count _objects) > 0) then {
// ACE_player sideChat format["tracks: %1", (count GVAR(trackedObjects))];
// #endif
// _endTime = ACE_diagTime;
+END_COUNTER(frago);
\ No newline at end of file
diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml
index dbb76c682d..ec5be829c4 100644
--- a/addons/frag/stringtable.xml
+++ b/addons/frag/stringtable.xml
@@ -45,6 +45,12 @@
Az ACE pattogzás-szimuláció engedélyezése
Включить симуляцию обломков ACE
+
+ Explosion Reflections Simulation
+
+
+ Enable the ACE Explosion Reflection Simulation
+
Maximum Projectiles Tracked
Máximos proyectiles rastreados