light intensity from object: handle campfires

This commit is contained in:
commy2 2015-04-07 23:02:54 +02:00
parent 88a5519465
commit d1b8595c0e

View File

@ -96,6 +96,14 @@ if (_lightSource isKindOf "CAManBase") then {
} forEach _lights;
// handle campfires
if (inflamed _lightSource) then {
private "_distance";
_distance = _unitPos distance position _lightSource;
_lightLevel = _lightLevel max linearConversion [0, 30, _distance, 0.5, 0, true];
};
};
_lightLevel