Fix local player name bubble not following large vehicles

In large vehicles the third-person camera display ROI is frozen at the
entry position, so the name bubble stayed there. Fall back to the actual
UserActor ROI when the camera controller is inactive due to a large
vehicle, matching how remote players already handle this.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Semmler 2026-03-28 14:30:18 -07:00
parent 39ee0b33d5
commit 8413647463
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C

View File

@ -154,8 +154,20 @@ MxResult NetworkManager::Tickle()
}
// Update local name bubble position
if (m_localNameBubble && cam->GetDisplayROI()) {
m_localNameBubble->Update(cam->GetDisplayROI());
if (m_localNameBubble) {
LegoROI* bubbleROI = cam->GetDisplayROI();
// In large vehicles the display ROI is frozen; use the actual actor ROI instead
if (cam->IsInVehicle() && !cam->IsActive()) {
LegoPathActor* userActor = UserActor();
if (userActor) {
bubbleROI = userActor->GetROI();
}
}
if (bubbleROI) {
m_localNameBubble->Update(bubbleROI);
}
}
}