mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Used QPATHTOF. Reverted config names.
Optimised fnc_getUnitFlashlights.
This commit is contained in:
parent
01c335d13a
commit
2158d39e8a
@ -11,11 +11,11 @@ class CfgWeapons {
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
class ACE_Map_Flashlight {
|
||||
ACE_Map_Flashlight_Color = "red";
|
||||
ACE_Map_Flashlight_Beam = QUOTE(PATHTOF(UI\Flashlight_beam_red_ca.paa));
|
||||
ACE_Map_Flashlight_Size = 1.75;
|
||||
ACE_Map_Flashlight_Sound = 1;
|
||||
class Flashlight {
|
||||
ACE_Flashlight_Colour = "red";
|
||||
ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_red_ca.paa);
|
||||
ACE_Flashlight_Size = 1.75;
|
||||
ACE_Flashlight_Sound = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -28,10 +28,10 @@ class CfgWeapons {
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
class ACE_Map_Flashlight {
|
||||
ACE_Map_Flashlight_Color = "red";
|
||||
ACE_Map_Flashlight_Beam = QUOTE(PATHTOF(UI\Flashlight_beam_red_ca.paa));
|
||||
ACE_Map_Flashlight_Size = 1.5;
|
||||
class Flashlight {
|
||||
ACE_Flashlight_Colour = "red";
|
||||
ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_red_ca.paa);
|
||||
ACE_Flashlight_Size = 1.5;
|
||||
ACE_Map_Flashlight_Sound = 1;
|
||||
};
|
||||
};
|
||||
@ -45,11 +45,11 @@ class CfgWeapons {
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
class ACE_Map_Flashlight {
|
||||
ACE_Map_Flashlight_Color = "white";
|
||||
ACE_Map_Flashlight_Beam = QUOTE(PATHTOF(UI\Flashlight_beam_white_ca.paa));
|
||||
ACE_Map_Flashlight_Size = 2.15;
|
||||
ACE_Map_Flashlight_Sound = 1;
|
||||
class Flashlight {
|
||||
ACE_Flashlight_Colour = "white";
|
||||
ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_white_ca.paa);
|
||||
ACE_Flashlight_Size = 2.15;
|
||||
ACE_Flashlight_Sound = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -5,11 +5,11 @@ class CfgWeapons {
|
||||
|
||||
class acc_flashlight: ItemCore {
|
||||
class ItemInfo: InventoryFlashlightItem_Base_F {
|
||||
class ACE_Map_Flashlight {
|
||||
ACE_Map_Flashlight_Color = "white";
|
||||
ACE_Map_Flashlight_Beam = QUOTE(PATHTOF(UI\Flashlight_beam_white_ca.paa));
|
||||
ACE_Map_Flashlight_Size = 2.75;
|
||||
ACE_Map_Flashlight_Sound = 1;
|
||||
class Flashlight {
|
||||
ACE_Flashlight_Colour = "white";
|
||||
ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_white_ca.paa);
|
||||
ACE_Flashlight_Size = 2.75;
|
||||
ACE_Flashlight_Sound = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -26,8 +26,8 @@ if (!isNull _light) then {
|
||||
};
|
||||
|
||||
if (_flashlight != "") then {
|
||||
_color = getText (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> QGVAR(Flashlight) >> QGVAR(Flashlight_Color));
|
||||
if !(_color in ["white", "red", "green", "blue", "yellow"]) then {_color = "white"};
|
||||
_color = getText (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "Flashlight" >> "ACE_Flashlight_Colour");
|
||||
if !(_color in ["white", "red", "green", "blue", "yellow", "orange"]) then {_color = "white"};
|
||||
_class = format["ACE_FlashlightProxy_%1", _color];
|
||||
|
||||
_light = _class createVehicle [0,0,0];
|
||||
|
@ -18,12 +18,4 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private _flashlights = [];
|
||||
|
||||
{
|
||||
if (isText (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> QGVAR(flashlight) >> QGVAR(Flashlight_Color))) then {
|
||||
_flashlights pushBackUnique _x;
|
||||
};
|
||||
} forEach (items _unit);
|
||||
|
||||
_flashlights
|
||||
(items _unit) select {isText (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "Flashlight" >> "ACE_Flashlight_Colour")}
|
@ -56,9 +56,9 @@ if (_flashlight == "") then {
|
||||
_mousePos = GVAR(mousePos);
|
||||
|
||||
//flashlight settings
|
||||
_cfg = (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> QGVAR(Flashlight));
|
||||
_size = getNumber (_cfg >> QGVAR(Flashlight_Size));
|
||||
_flashTex = getText (_cfg >> QGVAR(Flashlight_Beam));
|
||||
_cfg = (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "Flashlight");
|
||||
_size = getNumber (_cfg >> "ACE_Flashlight_Size");
|
||||
_flashTex = getText (_cfg >> "ACE_Flashlight_Beam");
|
||||
_beamSize = (safeZoneW/safeZoneWAbs) * _screenSize / _size;
|
||||
|
||||
//after 5x zoom, it's simulated to be fixed (it actually gets bigger relative to zoom)
|
||||
|
Loading…
Reference in New Issue
Block a user