mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Arsenal - Restore curator camera state when exiting (#8464)
This commit is contained in:
parent
310da98c5e
commit
66ce0ba5ff
@ -72,8 +72,15 @@ if (!isNil QGVAR(moduleUsed)) then {
|
||||
|
||||
ACE_player switchCamera GVAR(cameraView);
|
||||
|
||||
if (isMultiplayer) then {
|
||||
// Restore curator camera state
|
||||
if (!isNull curatorCamera) then {
|
||||
GVAR(curatorCameraData) params ["_position", "_dirAndUp"];
|
||||
|
||||
curatorCamera setPosASL _position;
|
||||
curatorCamera setVectorDirAndUp _dirAndUp;
|
||||
};
|
||||
|
||||
if (isMultiplayer) then {
|
||||
[QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(center) + "_face"] call CBA_fnc_globalEventJIP;
|
||||
[QGVAR(center) + "_face", GVAR(center)] call CBA_fnc_removeGlobalEventJIP;
|
||||
|
||||
@ -86,6 +93,8 @@ GVAR(currentBox) = objNull;
|
||||
GVAR(camera) = nil;
|
||||
GVAR(cameraHelper) = nil;
|
||||
|
||||
GVAR(curatorCameraData) = nil;
|
||||
|
||||
GVAR(mouseButtonState) = nil;
|
||||
GVAR(currentLeftPanel) = nil;
|
||||
GVAR(currentRightPanel) = nil;
|
||||
|
@ -334,6 +334,11 @@ if (isNil QGVAR(cameraPosition)) then {
|
||||
GVAR(cameraPosition) = [5,0,0,[0,0,0.85]];
|
||||
};
|
||||
|
||||
// Save curator camera state so camera position and direction are not modified while using arsenal
|
||||
if (!isNull curatorCamera) then {
|
||||
GVAR(curatorCameraData) = [getPosASL curatorCamera, [vectorDir curatorCamera, vectorUp curatorCamera]];
|
||||
};
|
||||
|
||||
GVAR(cameraHelper) = createAgent ["Logic", position GVAR(center) ,[] ,0 ,"none"];
|
||||
GVAR(cameraHelper) attachTo [GVAR(center), GVAR(cameraPosition) select 3, ""];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user