mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
Merge pull request #8133 from howard-stearns/do-not-recenter-hud-from-button
do not reset hud from button
This commit is contained in:
commit
aa8d1d097e
1 changed files with 6 additions and 3 deletions
|
@ -118,10 +118,12 @@ void OverlayConductor::update(float dt) {
|
|||
bool isDriving = updateAvatarHasDriveInput();
|
||||
bool drivingChanged = prevDriving != isDriving;
|
||||
bool isAtRest = updateAvatarIsAtRest();
|
||||
bool shouldRecenter = false;
|
||||
|
||||
if (_flags & SuppressedByDrive) {
|
||||
if (!isDriving) {
|
||||
_flags &= ~SuppressedByDrive;
|
||||
shouldRecenter = true;
|
||||
}
|
||||
} else {
|
||||
if (myAvatar->getClearOverlayWhenMoving() && drivingChanged && isDriving) {
|
||||
|
@ -132,6 +134,7 @@ void OverlayConductor::update(float dt) {
|
|||
if (_flags & SuppressedByHead) {
|
||||
if (isAtRest) {
|
||||
_flags &= ~SuppressedByHead;
|
||||
shouldRecenter = true;
|
||||
}
|
||||
} else {
|
||||
if (_hmdMode && headOutsideOverlay()) {
|
||||
|
@ -143,8 +146,8 @@ void OverlayConductor::update(float dt) {
|
|||
bool targetVisible = Menu::getInstance()->isOptionChecked(MenuOption::Overlays) && (0 == (_flags & SuppressMask));
|
||||
if (targetVisible != currentVisible) {
|
||||
offscreenUi->setPinned(!targetVisible);
|
||||
if (targetVisible && _hmdMode) {
|
||||
centerUI();
|
||||
}
|
||||
}
|
||||
if (shouldRecenter && !_flags) {
|
||||
centerUI();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue