-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map - Add Camping Light support #6087
Map - Add Camping Light support #6087
Conversation
Would be nice to see it blinking, but yes, it's not a big deal. |
{ | ||
private _position = _lightSource modelToWorld (_lightSource selectionPosition getText (_x >> "name")); | ||
private _distance = _unitPos distance _position; | ||
_lightLevel = _lightLevel max (linearConversion [0, 10, _distance, 1, 0, true]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should account for light brightness as there are several objects with collision lights that wouldn't be useful
maybe something like:
_lightLevel = _lightLevel max (linearConversion [0, 10, _distance, 1, 0, true] * linearConversion [25, 2000, getNumber (_x >> "intensity"), 0, 1, true]);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.g. ghosthawk collision lights
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't add intensity
check because of this comment in Reflectors
code above: @todo intensity affects range?
. But it looks like you are right and intensity of MarkerLights
is more important than for Reflectors
. I'll add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I slightly modified linearConversion
range to suit all found light sources.
* Add Camping Light support * Add intensity check
When merged this pull request will:
Camping Light and some other vehicles have
MarkerLights
config instead ofReflectors
with hitpoints. Their lights should be considered when determining map light.Unfortunately I don't know how to consider
blinking
parameter. So blinking lights will light a map like continuous light. Not a big deal I think.