Merge pull request #3283 from acemod/reflectionsDefaultOff

Make explosion reflections optional, default off
This commit is contained in:
Thomas Kooi 2016-02-18 16:50:19 +01:00
commit bf082e928d
4 changed files with 37 additions and 2 deletions

View File

@ -1,30 +1,42 @@
class ACE_Settings {
class GVAR(Enabled) {
category = CSTRING(Module_DisplayName);
displayName = CSTRING(EnableFrag);
description = CSTRING(EnableFrag_Desc);
typeName = "BOOL";
value = 1;
};
class GVAR(SpallEnabled) {
category = CSTRING(Module_DisplayName);
displayName = CSTRING(EnableSpall);
description = CSTRING(EnableSpall_Desc);
typeName = "BOOL";
value = 0;
};
class GVAR(ReflectionsEnabled) {
category = CSTRING(Module_DisplayName);
displayName = CSTRING(EnableReflections);
description = CSTRING(EnableReflections_Desc);
typeName = "BOOL";
value = 0;
};
class GVAR(maxTrack) {
category = CSTRING(Module_DisplayName);
displayName = CSTRING(MaxTrack);
description = CSTRING(MaxTrack_Desc);
typeName = "SCALAR";
value = 500;
};
class GVAR(MaxTrackPerFrame) {
category = CSTRING(Module_DisplayName);
displayName = CSTRING(MaxTrackPerFrame);
description = CSTRING(MaxTrackPerFrame_Desc);
typeName = "SCALAR";
value = 50;
};
class GVAR(EnableDebugTrace) {
category = CSTRING(Module_DisplayName);
displayName = CSTRING(EnableDebugTrace);
description = CSTRING(EnableDebugTrace_Desc);
typeName = "BOOL";

View File

@ -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);

View File

@ -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);

View File

@ -1,6 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Frag">
<Key ID="STR_ACE_Frag_Module_DisplayName">
<English>Fragmentation Simulation</English>
<Polish>Symulacja fragmentacji</Polish>
<Spanish>Simulación de fragmentación</Spanish>
<German>Splittersimulation</German>
<Czech>Simulace fragmentů</Czech>
<Portuguese>Simulação de fragmentação</Portuguese>
<French>Simulation de la fragmentation</French>
<Hungarian>Repesz-szimuláció</Hungarian>
<Russian>Симуляция осколков</Russian>
</Key>
<Key ID="STR_ACE_Frag_EnableFrag">
<English>Fragmentation Simulation</English>
<Polish>Symulacja fragmentacji</Polish>
@ -45,6 +56,12 @@
<Hungarian>Az ACE pattogzás-szimuláció engedélyezése</Hungarian>
<Russian>Включить симуляцию обломков ACE</Russian>
</Key>
<Key ID="STR_ACE_Frag_EnableReflections">
<English>Explosion Reflections Simulation</English>
</Key>
<Key ID="STR_ACE_Frag_EnableReflections_Desc">
<English>Enable the ACE Explosion Reflection Simulation</English>
</Key>
<Key ID="STR_ACE_Frag_MaxTrack">
<English>Maximum Projectiles Tracked</English>
<Spanish>Máximos proyectiles rastreados</Spanish>