From fc7d68e12994d41b6b9406c84eae376e1db3246b Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Tue, 9 Jan 2024 23:16:08 -0600 Subject: [PATCH] Fixed additional quotes causing issues in .bisurf files --- addons/frag/functions/fnc_getMaterialInfo.sqf | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/addons/frag/functions/fnc_getMaterialInfo.sqf b/addons/frag/functions/fnc_getMaterialInfo.sqf index abab212b28..f225124bbf 100644 --- a/addons/frag/functions/fnc_getMaterialInfo.sqf +++ b/addons/frag/functions/fnc_getMaterialInfo.sqf @@ -1,22 +1,17 @@ #include "script_component.hpp" /* * Author: Lambda.Tiger - * This function returns fragmentation parameters for a specific - * ammo type. + * This function returns a classification of material type based + * on the surface hit. * * Arguments: - * 0: _ammo - cfgAmmo type of ammo to check + * 0: surfacetype - either a cfgSurfaces path .bisurf filepath * * Return Value: - * _ammoInfo - * 0: _fragRange - search range for fragments - * 1: _fragVel - gurney equation calculated velocity - * 2: _fragTypes - array of fragment types - * 3: _fragCount - modified frag count used under assumptions - * of spherical fragmentation + * _material - Material categories as expanded on in line 43 below * * Example: - * ["B_556x45_Ball"] call ace_frag_fnc_getFragInfo; + * [_surfaceType] call ace_frag_fnc_getFragInfo; * * Public: No */ @@ -34,7 +29,7 @@ if (isClass (configFile >> "CfgSurfaces" >> _surfType)) then { _material = getText (configFile >> "CfgSurfaces" >> _surfType >> "soundEnviron"); } else { // Messy way when a surface isn't added to cfgSurfaces private _surfFileText = loadFile _surfType; - _surfFileText = (tolower _surfFileText) splitString " ;="+ endl; + _surfFileText = (tolower _surfFileText) splitString " "";="+ endl; private _idx = _surfFileText find "soundenviron"; _material = _surfFileText#(_idx+1); if (_material isEqualTo "empty") then {