Skip to content

Fix vehicle unseating on region crossings by ignoring outgoing sim kills - #6170

Open
Shadowolf7 wants to merge 1 commit into
secondlife:mainfrom
Shadowolf7:upstream-ll-vehicle-fix
Open

Fix vehicle unseating on region crossings by ignoring outgoing sim kills#6170
Shadowolf7 wants to merge 1 commit into
secondlife:mainfrom
Shadowolf7:upstream-ll-vehicle-fix

Conversation

@Shadowolf7

Copy link
Copy Markdown

Description

This PR resolves the long-standing bug where avatars are forcibly unseated from vehicles during region crossings.

Root Cause

During a region crossing:

  1. The avatar and vehicle cross into the receiving simulator, and the viewer sets its active agent region to the new simulator.
  2. The outgoing simulator (lagging by 0–1s) cleans up its local physics representation of the vehicle and sends a UDP KillObject packet to the client.
  3. Because the client did not differentiate between an active-region object deletion and an outgoing-simulator crossing cleanup, process_kill_object called markDead() on the vehicle prim.
  4. In LLViewerObject::markDead(), lines 480-489 detected the seated avatar and executed ((LLVOAvatar*)childp)->getOffObject(), prematurely severing the sit link on the client side before the receiving simulator's ObjectUpdate took over.

Solution

In process_kill_object (indra/newview/llviewermessage.cpp), we check if a kill packet for the avatar's seated root object originates from a non-active (outgoing) region (regionp != gAgent.getRegion()). If so, the cleanup packet is ignored, keeping the vehicle and seated avatar intact across the boundary handoff.

Actual vehicle deletions (e.g. parcel auto-return, hard banlines, llDie()) sent by the active simulator (regionp == gAgent.getRegion()) continue to execute normally.

Verification

  • Tested in-world across 16+ region crossings with multiple vehicles.
  • Confirmed zero markDead() unseat ejections.
  • Maintained continuous, uninterrupted seating through multiple consecutive border crossings.

@github-actions github-actions Bot added the c/cpp label Aug 21, 2026
@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants