Skip to content
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

Merged
merged 2 commits into from
Feb 13, 2018

Conversation

Dystopian
Copy link
Contributor

@Dystopian Dystopian commented Jan 26, 2018

When merged this pull request will:

  • title.

Camping Light and some other vehicles have MarkerLights config instead of Reflectors 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.

@jonpas jonpas added the kind/enhancement Release Notes: **IMPROVED:** label Jan 29, 2018
@jonpas jonpas added this to the 3.13.0 milestone Jan 29, 2018
@jonpas
Copy link
Member

jonpas commented Jan 29, 2018

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.

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]);
Copy link
Contributor

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]);

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@PabstMirror PabstMirror merged commit e683c52 into acemod:master Feb 13, 2018
@Dystopian Dystopian deleted the map_light_from_MarkerLights branch February 13, 2018 19:29
@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.12.2 Apr 2, 2018
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
* Add Camping Light support

* Add intensity check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants