ACE3/addons/core/functions/fnc_getWindDirection.sqf

32 lines
1.1 KiB
Plaintext
Raw Normal View History

/*
* Author: commy2
*
* Get the compass direction the wind is blowing from.
*
* Argument:
* None.
*
* Return value:
* Wind direction. (String)
*/
2015-01-12 11:14:15 +00:00
#include "\z\ace\addons\core\script_component.hpp"
switch (round (windDir / 360 * 16)) do {
2015-01-11 18:20:14 +00:00
case 1 : {localize QUOTE(DOUBLES(STR,GVAR(SSW)))};
case 2 : {localize QUOTE(DOUBLES(STR,GVAR(SW)))};
case 3 : {localize QUOTE(DOUBLES(STR,GVAR(WSW)))};
case 4 : {localize QUOTE(DOUBLES(STR,GVAR(W)))};
case 5 : {localize QUOTE(DOUBLES(STR,GVAR(WNW)))};
case 6 : {localize QUOTE(DOUBLES(STR,GVAR(NW)))};
case 7 : {localize QUOTE(DOUBLES(STR,GVAR(NNW)))};
case 8 : {localize QUOTE(DOUBLES(STR,GVAR(N)))};
case 9 : {localize QUOTE(DOUBLES(STR,GVAR(NNE)))};
case 10 : {localize QUOTE(DOUBLES(STR,GVAR(NE)))};
case 11 : {localize QUOTE(DOUBLES(STR,GVAR(ENE)))};
case 12 : {localize QUOTE(DOUBLES(STR,GVAR(E)))};
case 13 : {localize QUOTE(DOUBLES(STR,GVAR(ESE)))};
case 14 : {localize QUOTE(DOUBLES(STR,GVAR(SE)))};
case 15 : {localize QUOTE(DOUBLES(STR,GVAR(SSE)))};
default {localize QUOTE(DOUBLES(STR,GVAR(S)))};
};