From f132955d9fe0c36b62fd73c61e68c9a4dc5a69d0 Mon Sep 17 00:00:00 2001 From: esteldunedain <nicolas.d.badano@gmail.com> Date: Sat, 9 May 2015 21:47:57 -0300 Subject: [PATCH] Reenable refraction fx but make it optional for the moment. --- addons/overheating/config.cpp | 14 +++++- addons/overheating/functions/fnc_firedEH.sqf | 50 ++++++++++---------- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/addons/overheating/config.cpp b/addons/overheating/config.cpp index 0e899e1b25..489c1ebd41 100644 --- a/addons/overheating/config.cpp +++ b/addons/overheating/config.cpp @@ -20,5 +20,17 @@ class CfgPatches { #include "CfgWeapons.hpp" -#include "ACE_Settings.hpp" +class ACE_Settings { + class GVAR(DisplayTextOnJam) { + typeName = "BOOL"; + isClientSettable = 1; + value = 1; + displayName = "$STR_ACE_overheating_SettingDisplayTextName"; + description = "$STR_ACE_overheating_SettingDisplayTextDesc"; + }; + class GVAR(enableRefractEffect) { + typeName = "BOOL"; + value = 0; + }; +}; diff --git a/addons/overheating/functions/fnc_firedEH.sqf b/addons/overheating/functions/fnc_firedEH.sqf index e9fcbc8bda..4f5e0b7119 100644 --- a/addons/overheating/functions/fnc_firedEH.sqf +++ b/addons/overheating/functions/fnc_firedEH.sqf @@ -46,31 +46,31 @@ if (time > (_unit getVariable [QGVAR(lastDrop), -1000]) + 0.40 && _scaledTempera _direction = (_unit weaponDirection _weapon) vectorMultiply 0.25; _position = (position _projectile) vectorAdd (_direction vectorMultiply (4*(random 0.30))); - /* - // Refract SFX, beginning at temp 100º - _intensity = (_scaledTemperature - 0.10) / 0.90; - drop [ - "\A3\data_f\ParticleEffects\Universal\Refract", - "", - "Billboard", - 1.1, - 2, - _position, - _direction, - 1, - 1.2, - 1.0, - 0.1, - [0.1,0.15], - [[0.06,0.06,0.06,0.32*_scaledTemperature], [0.3,0.3,0.3,0.28*_scaledTemperature], [0.3,0.3,0.3,0.25*_scaledTemperature], [0.3,0.3,0.3,0.22*_scaledTemperature], [0.3,0.3,0.3,0.1*_scaledTemperature]], - [1,0], - 0.1, - 0.05, - "", - "", - "" - ]; - */ + if (GVAR(enableRefractEffect)) then { + // Refract SFX, beginning at temp 100º and maxs out at 500º + _intensity = (_scaledTemperature - 0.10) / 0.40 min 1; + drop [ + "\A3\data_f\ParticleEffects\Universal\Refract", + "", + "Billboard", + 10, + 2, + _position, + _direction, + 0, + 1.2, + 1.0, + 0.1, + [0.10,0.25], + [[0.6,0.6,0.6,0.3*_intensity],[0.2,0.2,0.2,0.05*_intensity]], + [0,1], + 0.1, + 0.05, + "", + "", + "" + ]; + }; // Smoke SFX, beginning at temp 150º _intensity = (_scaledTemperature - 0.15) / 0.85;