From c2972574217a3a1af7516418562159aa53103bc3 Mon Sep 17 00:00:00 2001 From: jaynus <jaynus@gmail.com> Date: Thu, 21 May 2015 15:06:55 -0700 Subject: [PATCH] Disable frag by default. Add @pabstmirror fix closes #1339 closes #820 --- addons/frag/ACE_Settings.hpp | 2 +- addons/frag/functions/fnc_addPfhRound.sqf | 2 +- addons/frag/functions/fnc_pfhRound.sqf | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/frag/ACE_Settings.hpp b/addons/frag/ACE_Settings.hpp index bbf0398cfb..5efba45057 100644 --- a/addons/frag/ACE_Settings.hpp +++ b/addons/frag/ACE_Settings.hpp @@ -9,7 +9,7 @@ class ACE_Settings { displayName = "$STR_ACE_frag_EnableSpall"; description = "$STR_ACE_frag_EnableSpall_Desc"; typeName = "BOOL"; - value = 1; + value = 0; }; class GVAR(maxTrack) { displayName = "$STR_ACE_frag_MaxTrack"; diff --git a/addons/frag/functions/fnc_addPfhRound.sqf b/addons/frag/functions/fnc_addPfhRound.sqf index 7530b8f062..1fae55278e 100644 --- a/addons/frag/functions/fnc_addPfhRound.sqf +++ b/addons/frag/functions/fnc_addPfhRound.sqf @@ -54,7 +54,7 @@ if(_doFragTrack && alive _round) then { _spallTrackID = []; private["_args"]; - _args = [_round, (getPosASL _round), (velocity _round), _type, time, _gun, _doSpall, _spallTrack, _spallTrackID, + _args = [_round, (getPosASL _round), (velocity _round), _type, diag_frameno, _gun, _doSpall, _spallTrack, _spallTrackID, (getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip))), (getNumber (configFile >> "CfgAmmo" >> _type >> "explosive")), (getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")), diff --git a/addons/frag/functions/fnc_pfhRound.sqf b/addons/frag/functions/fnc_pfhRound.sqf index 8cc9457842..2c0d8944e7 100644 --- a/addons/frag/functions/fnc_pfhRound.sqf +++ b/addons/frag/functions/fnc_pfhRound.sqf @@ -1,10 +1,10 @@ #include "script_component.hpp" -private ["_round", "_lastPos", "_lastVel", "_type", "_time", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"]; +private ["_round", "_lastPos", "_lastVel", "_type", "_firedFrame", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"]; _round = _this select 0; _lastPos = _this select 1; _lastVel = _this select 2; _type = _this select 3; -_time = _this select 4; +_firedFrame = _this select 4; _doSpall = _this select 6; _spallTrack = _this select 7; _foundObjectHPIds = _this select 8; @@ -19,7 +19,7 @@ if(_round in GVAR(blackList)) exitWith { }; if (!alive _round) then { - if(_time != time) then { + if((diag_frameno - _firedFrame) > 1) then { if(_skip == 0) then { if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then { [QGVAR(frag_eh), _this] call ace_common_fnc_serverEvent;