From 63b41843fcda30d7e12679fbc6318c37811ce409 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 25 Jul 2016 19:43:42 +0200 Subject: [PATCH] remove some broken functions --- addons/common/XEH_PREP.hpp | 3 - .../functions/fnc_getNumberFromMissionSQM.sqf | 16 ----- .../functions/fnc_getStringFromMissionSQM.sqf | 66 ------------------- addons/common/functions/fnc_isAutoWind.sqf | 15 ----- 4 files changed, 100 deletions(-) delete mode 100644 addons/common/functions/fnc_getNumberFromMissionSQM.sqf delete mode 100644 addons/common/functions/fnc_getStringFromMissionSQM.sqf delete mode 100644 addons/common/functions/fnc_isAutoWind.sqf diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 0649dcefea..c28cb251cb 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -69,12 +69,10 @@ PREP(getMapPosFromGrid); PREP(getMarkerType); PREP(getMGRSdata); PREP(getName); -PREP(getNumberFromMissionSQM); PREP(getNumberMagazinesIn); PREP(getPitchBankYaw); PREP(getSettingData); PREP(getStaminaBarControl); -PREP(getStringFromMissionSQM); PREP(getTargetAzimuthAndInclination); PREP(getTargetDistance); PREP(getTargetObject); @@ -102,7 +100,6 @@ PREP(hideUnit); PREP(insertionSort); PREP(interpolateFromArray); PREP(inTransitionAnim); -PREP(isAutoWind); PREP(isAwake); PREP(isEngineer); PREP(isEOD); diff --git a/addons/common/functions/fnc_getNumberFromMissionSQM.sqf b/addons/common/functions/fnc_getNumberFromMissionSQM.sqf deleted file mode 100644 index 6c381d4f54..0000000000 --- a/addons/common/functions/fnc_getNumberFromMissionSQM.sqf +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Author: commy2 - * Get a number from the mission.sqm file. Mission has to be saved in the Editor. - * On non-existing entries, it might return 0 or the value of an entry with the same name of another calss. - * - * Arguments: - * 0: Path of the entry in the mission.sqm - * - * Return Value: - * Entry value - * - * Public: No - */ -#include "script_component.hpp" - -parseNumber (_this call FUNC(getStringFromMissionSQM)) // return diff --git a/addons/common/functions/fnc_getStringFromMissionSQM.sqf b/addons/common/functions/fnc_getStringFromMissionSQM.sqf deleted file mode 100644 index 0893b7bb0d..0000000000 --- a/addons/common/functions/fnc_getStringFromMissionSQM.sqf +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Author: commy2 - * Get a string from the mission.sqm file. Mission has to be saved in the Editor. - * The string cannot contain the ; character. - * If the entry does not exist, it might return an empty string or an entry with the same name of another class! - * - * Arguments: - * 0: Path of the entry in the mission.sqm - * - * Return Value: - * Value of the entry. - * - * Public: No - */ -#include "script_component.hpp" - -[_this] params ["_path", [], [[]]]; - -if (missionName == "") exitWith {""}; - -private _mission = toArray toLower loadFile "mission.sqm"; -_mission resize 65536; - -{ - if (_x < 33) then { - _mission set [_forEachIndex, -1]; - } -} forEach _mission; - -_mission = toString (_mission - [-1]); - -{_path set [_forEachIndex, toLower _x]} forEach _path; - -for "_a" from 0 to (count _path - 2) do { - private _class = format ["class%1{", _path select _a]; - private _index = _mission find _class; - private _array = toArray _mission; - - for "_b" from 0 to (_index + count toArray _class - 1) do { - _array set [_b, -1]; - }; - - _array = _array - [-1]; - - _mission = toString _array; -}; - -private _entry = format ["%1=", _path select (count _path - 1)]; -_index = _mission find _entry; - -if (_index == -1) exitWith {""}; - -_array = toArray _mission; - -for "_b" from 0 to (_index + count toArray _entry - 1) do { - _array set [_b, -1]; -}; - -_mission = toString (_array - [-1]); - -_index = _mission find ";"; - -_mission = toArray _mission; -_mission resize _index; - -format ["%1", toString _mission] // return diff --git a/addons/common/functions/fnc_isAutoWind.sqf b/addons/common/functions/fnc_isAutoWind.sqf deleted file mode 100644 index 04bb22a785..0000000000 --- a/addons/common/functions/fnc_isAutoWind.sqf +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Author: commy2 - * Check if wind is set on auto. - * - * Arguments - * None - * - * Return Value: - * This mission has automatic wind? - * - * Public: Yes - */ -#include "script_component.hpp" - -["Mission", "Intel", "windForced"] call FUNC(getNumberFromMissionSQM) != 1 // return