mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Fix camera reset under bird view in Atlas
Resetting camera while in bird view should reset birdview flag.
Fixes: 9388692a47
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
parent
9388692a47
commit
38fdea550d
1 changed files with 7 additions and 1 deletions
|
|
@ -37,6 +37,11 @@
|
|||
#include "tools/atlas/GameInterface/SharedTypes.h"
|
||||
#include "tools/atlas/GameInterface/View.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
bool birdEyeView{false};
|
||||
} // namespace
|
||||
|
||||
namespace AtlasMessage {
|
||||
|
||||
MESSAGEHANDLER(CameraReset)
|
||||
|
|
@ -60,6 +65,8 @@ MESSAGEHANDLER(CameraReset)
|
|||
}
|
||||
|
||||
g_Game->GetView()->ResetCameraTarget(target);
|
||||
|
||||
birdEyeView = false;
|
||||
}
|
||||
|
||||
MESSAGEHANDLER(ScrollConstant)
|
||||
|
|
@ -263,7 +270,6 @@ MESSAGEHANDLER(ToggleBirdsEyeView)
|
|||
if (!g_Game || g_Game->GetView()->GetCinema()->IsPlaying())
|
||||
return;
|
||||
|
||||
static bool birdEyeView{false};
|
||||
static float declination{0.f};
|
||||
|
||||
CCamera& camera = AtlasView::GetView_Game()->GetCamera();
|
||||
|
|
|
|||
Loading…
Reference in a new issue