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

Weather - Fix wind on airports #6631

Merged
merged 1 commit into from
Nov 15, 2018
Merged

Weather - Fix wind on airports #6631

merged 1 commit into from
Nov 15, 2018

Conversation

BaerMitUmlaut
Copy link
Member

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.

@BaerMitUmlaut BaerMitUmlaut added the kind/bug-fix Release Notes: **FIXED:** label Oct 8, 2018
@BaerMitUmlaut BaerMitUmlaut added this to the 3.13.0 milestone Oct 8, 2018
private _nearBuildings = count (_windSource nearObjects ["Building", 50]);
private _nearBuildings = {
// Filter lights - fixes high roughness on airports (#6602)
str _x find "light" == -1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is case sensitive.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know.

Copy link
Contributor

@dedmen dedmen Oct 9, 2018

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.

Copy link
Member Author

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.

Copy link
Contributor

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)

Copy link
Member Author

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.

Copy link
Contributor

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

@PabstMirror PabstMirror changed the title Fix wind on airports Weather - Fix wind on airports Nov 2, 2018
@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.12.4 Nov 9, 2018
@PabstMirror PabstMirror merged commit 8119e87 into master Nov 15, 2018
@PabstMirror PabstMirror deleted the fix-airport-wind branch November 15, 2018 16:49
BaerMitUmlaut added a commit that referenced this pull request Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants