Center spectator map correctly in FPP (#6010)

Instead of centering on the camera object use `positionCameraToWorld` to get the actual viewpoint
This commit is contained in:
SilentSpike 2018-01-04 18:03:38 +00:00 committed by GitHub
parent 9e14a73b3c
commit fb3fc09997
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,8 @@ if (GVAR(uiMapVisible)) then {
CTRL_MAP_TITLE ctrlSetText (getMissionConfigValue ["onLoadName", getMissionConfigValue ["briefingName", localize ELSTRING(common,unknown)]]); CTRL_MAP_TITLE ctrlSetText (getMissionConfigValue ["onLoadName", getMissionConfigValue ["briefingName", localize ELSTRING(common,unknown)]]);
CTRL_MAP_SPEC_NUM ctrlSetText str ({GETVAR(_x,GVAR(isSet),false)} count allPlayers); CTRL_MAP_SPEC_NUM ctrlSetText str ({GETVAR(_x,GVAR(isSet),false)} count allPlayers);
CTRL_MAP ctrlMapAnimAdd [0, 0.05, getPosASLVisual GVAR(camera)]; // Center on camera position (accounts for first person)
CTRL_MAP ctrlMapAnimAdd [0, 0.05, positionCameraToWorld [0,0,0]];
ctrlMapAnimCommit CTRL_MAP; ctrlMapAnimCommit CTRL_MAP;
// Disable camera input while map is open // Disable camera input while map is open