-
Notifications
You must be signed in to change notification settings - Fork 737
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
Weather - Fix wind on airports #6631
Conversation
private _nearBuildings = count (_windSource nearObjects ["Building", 50]); | ||
private _nearBuildings = { | ||
// Filter lights - fixes high roughness on airports (#6602) | ||
str _x find "light" == -1 |
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.
This is case sensitive.
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 know.
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.
Most of CUP runway lights are lowercase. With exception of CUP_A1_NavigLight
but it's modelname is naviglight.p3d
and I think str object
returns modelname right?
Vanilla Arma "Runway Edgelight" is Land_Flush_Light_green_F
uppercase Light.
Land_NavigLight
/\A3\Roads_F\Runway\RunwayLights\NavigLight.p3d
is also a runway light ("REIL")
Land_PortableHelipadLight_01_F
/PortableHelipadLight_01_F.p3d
Land_runway_edgelight
there are 7 variants for this and they are all lowercase.
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.
The flush light is also lowercase. All lights I've seen are lowercase.
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.
{
(boundingBox _x) params ["_a", "_b"];
(_a distance2D _b) > 5
} count (player nearObjects ["Building", 50]);
Could also check size (2d, because a lot of lights are actually very long poles)
(0.06ms vs 0.038ms for 15 objects)
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.
That's a neat idea, though I would say a much lower number than 5. Bushes and such should affect roughness.
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.
"light" is faster and should probably work for most objects we want to filter
we can always look at size checking later
When merged this pull request will:
The terrain roughness value rises a lot due to the amount of "buildings" nearby - runway lights and even the runway itself. This adds a simple but effective filter for all lights which does the trick without impacting performance much.