Simplify spectator compass code

This commit is contained in:
SilentSpike 2016-07-23 10:42:58 +01:00
parent ec2a90f62c
commit 9ee2f10f63

View File

@ -46,19 +46,12 @@ _positions = [
[_compassW + _offset, 0]
];
_sequence = if (_heading < 90) then {
[_SW, _WN, _NE, _ES]
} else {
if (_heading < 180) then {
[_WN, _NE, _ES, _SW]
} else {
if (_heading < 270) then {
[_NE, _ES, _SW, _WN]
} else {
[_ES, _SW, _WN, _NE]
};
};
};
_sequence = [
[_SW, _WN, _NE, _ES],
[_WN, _NE, _ES, _SW],
[_NE, _ES, _SW, _WN],
[_ES, _SW, _WN, _NE]
] select floor(_heading/90);
{