Skip to content

Commit

Permalink
Fix wind roughness on airports (#6631)
Browse files Browse the repository at this point in the history
  • Loading branch information
BaerMitUmlaut authored and PabstMirror committed Nov 15, 2018
1 parent b35d5c8 commit 8119e87
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addons/weather/functions/fnc_calculateRoughnessLength.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
#define ROUGHNESS_LENGTHS [0.0002, 0.0005, 0.0024, 0.03, 0.055, 0.1, 0.2, 0.4, 0.8, 1.6]

private _windSource = _this vectorDiff ((vectorNormalized wind) vectorMultiply 25);

private _nearBuildings = count (_windSource nearObjects ["Building", 50]);
private _nearBuildings = {
// Filter lights - fixes high roughness on airports (#6602)
str _x find "light" == -1
} count (_windSource nearObjects ["Building", 50]);
private _isWater = surfaceIsWater _windSource;

if (_nearBuildings == 0 && _isWater) exitWith {
Expand Down

0 comments on commit 8119e87

Please sign in to comment.