Fix vehicle unseating on region crossings by ignoring outgoing sim kills - #6170
Open
Shadowolf7 wants to merge 2 commits into
Open
Shadowolf7 wants to merge 2 commits into
Shadowolf7 wants to merge 2 commits into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
akleshchev
approved these changes
Aug 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses viewer-side unseating during region crossings by ignoring KillObject packets coming from the outgoing (non-active) simulator when they target the seated vehicle root, preventing premature markDead() unseat behavior during the handoff.
Changes:
- Add a guard in
process_kill_objectto ignoreKillObjectmessages from non-active regions when they target the agent’s seated root object. - Emit an informational log when such a kill is ignored.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Only emit LL_INFOS when ignoring a kill on the linkset root prim - Cache objectp->getRootEdit() in a local variable to avoid redundant lookups
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
indra/newview/llviewermessage.cpp:3685
- This compares the sender with
gAgent.getRegion(), but the ordinary crossing path does not update that pointer:process_crossed_region()only adds the destination region, and the crossing branch ofprocess_agent_movement_complete()does not callgAgent.setRegion(). After the seated linkset has been updated into the destination, a legitimateKillObjectfrom that active simulator can therefore satisfy this condition and be skipped, leaving the object (and its cache/selection state) alive. Compare against the seated root's current object region, or update the agent region as part of the crossing before applying this filter.
if ( regionp && (regionp != gAgent.getRegion()) &&
isAgentAvatarValid() && gAgentAvatarp->isSitting() )
{
LLViewerObject* rootp = objectp->getRootEdit();
if (rootp && (gAgentAvatarp->getRoot() == rootp))
| LL_INFOS("Avatar") << "Ignoring vehicle kill from outgoing region " << regionp->getName() | ||
| << " for seated root object " << rootp->getID() << LL_ENDL; | ||
| } | ||
| continue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves the long-standing bug where avatars are forcibly unseated from vehicles during region crossings.
Root Cause
During a region crossing:
KillObjectpacket to the client.process_kill_objectcalledmarkDead()on the vehicle prim.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'sObjectUpdatetook 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
markDead()unseat ejections.