Merge pull request #1980 from MikeMatrix/headDirBasedWindIndication

Headdirection based wind indication
This commit is contained in:
Glowbal
2015-08-08 14:51:37 +02:00
2 changed files with 2 additions and 1 deletions

View File

@ -107,3 +107,4 @@ VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Winter <simon@agius-muscat.net> Winter <simon@agius-muscat.net>
zGuba zGuba
Drill <drill87@gmail.com> Drill <drill87@gmail.com>
MikeMatrix <m.braun92@gmail.com>

View File

@ -47,7 +47,7 @@ GVAR(WindInfo) = true;
}; };
if (_windSpeed > 0.2) then { if (_windSpeed > 0.2) then {
_playerDir = getDir ACE_player; _playerDir = (ACE_player call CBA_fnc_headDir) select 0;
_windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1);
_windIndex = round(((_playerDir - _windDir + 360) % 360) / 30); _windIndex = round(((_playerDir - _windDir + 360) % 360) / 30);
_windIndex = _windIndex % 12; _windIndex = _windIndex % 12;