mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Map - Add Camping Light support (#6087)
* Add Camping Light support * Add intensity check
This commit is contained in:
parent
04191e3c99
commit
e683c524d7
@ -79,6 +79,21 @@ if (_lightSource isKindOf "CAManBase") then {
|
||||
|
||||
} forEach _lights;
|
||||
|
||||
if (isCollisionLightOn _lightSource) then {
|
||||
private _markerLights = [
|
||||
_lightSource,
|
||||
{configProperties [configFile >> "CfgVehicles" >> typeOf _this >> "MarkerLights", "isClass _x", true]},
|
||||
uiNamespace,
|
||||
format [QEGVAR(cache,MarkerLights_%1), typeOf _lightSource],
|
||||
1E11
|
||||
] call FUNC(cachedCall);
|
||||
{
|
||||
private _position = _lightSource modelToWorld (_lightSource selectionPosition getText (_x >> "name"));
|
||||
private _distance = _unitPos distance _position;
|
||||
_lightLevel = _lightLevel max (linearConversion [0, 10, _distance, 1, 0, true] * linearConversion [0, 1300, getNumber (_x >> "intensity"), 0, 1, true]);
|
||||
} forEach _markerLights;
|
||||
};
|
||||
|
||||
// handle campfires
|
||||
if (inflamed _lightSource) then {
|
||||
private _distance = _unitPos distance position _lightSource;
|
||||
|
Loading…
Reference in New Issue
Block a user