mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-05-02 02:23:56 +00:00
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:
parent
39ee0b33d5
commit
8413647463
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user