Skip to content

fix(Core/Player): Keep transport passenger position on teleport - #28174

Open
bloodfangx wants to merge 1 commit into
azerothcore:masterfrom
bloodfangx:fix/transport-passenger-teleport-offset
Open

bloodfangx wants to merge 1 commit into
azerothcore:masterfrom
bloodfangx:fix/transport-passenger-teleport-offset

Conversation

@bloodfangx

@bloodfangx bloodfangx commented Oct 18, 2026 •

Copy link
Copy Markdown

Changes Proposed:

This PR proposes changes to:

  • Core (units, players, creatures, game systems).
  • Scripts (bosses, spell scripts, creature scripts).
  • Database (SAI, creatures, etc).

Description

When a player who was attached to a moving transport (like sitting on a chair on a boat or zeppelin) teleported by clicking on a chair, only their world coordinates were updated. Their local offset relative to the transport remained unchanged.

As a result, on the very next transport tick, the game recalculated the player's position using that old, outdated offset—causing them to instantly rubberband back to their previous spot.

This pull request recalculates the player's local transport offset based on their new teleport destination before sending the teleport packets to the client. This keeps both their world position and transport offset correctly synchronized.

AI-assisted Pull Requests

Important

Using AI tools to prepare pull requests is allowed, but it must be disclosed and it must follow our AC guidelines for AI Agentic Engineering (link below).

You are expected to fully understand the changes you submit and to be able to explain and justify them when maintainers ask.

  • AI tools (e.g. Claude, ChatGPT, or similar) were used entirely or partially to prepare this pull request. If checked, specify which tools and models below.
    • Tools/models used:
  • I have read and understood the AC guidelines for AI Agentic Engineering

Issues Addressed:

  • Closes

SOURCE:

The changes have been validated through:

  • Live research (checked on live servers, e.g Classic WotLK, Retail, etc.)
  • Sniffs (remember to share them with the open source community!)
  • Video evidence, knowledge databases or other public sources (e.g forums, Wowhead, etc.)
  • The changes promoted by this pull request come partially or entirely from another project (cherry-pick). Cherry-picks must be committed using the proper --author tag in order to be accepted, thus crediting the original authors, unless otherwise unable to be found

Tests Performed:

This PR has been:

  • Tested in-game by the author.
  • Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • This pull request requires further testing and may have edge cases to be tested.

Tested locally on Windows/Linux (builds cleanly without warnings). Verified in-game on a moving boat while seated.

How to Test the Changes:

  • This pull request can be tested by following the reproduction steps provided in the linked issue
  • This pull request requires further testing. Provide steps to test your changes. If it requires any specific setup e.g multiple players please specify it as well.
  1. Board a moving transport that contains usable chairs/seats (e.g., the Booty Bay / Ratchet boat or a Zeppelin).
  2. Right-click a chair to sit on it so you are attached to the transport as a passenger.
  3. Trigger a teleport or seat switch on the boat (e.g., teleport to another seat or position on the transport via command or spell).
  4. Before the fix: The player's world position briefly updates, but upon the next transport update tick, the player rubberbands/snaps back to the original seat.
  5. After the fix: The passenger offset updates properly; the player teleports and remains in the new position/seat smoothly as the transport continues moving.

Known Issues and TODO List:

  • None

@github-actions github-actions Bot added CORE Related to the core file-cpp Used to trigger the matrix build labels Oct 18, 2026
@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: azerothcore/azerothcore-wotlk/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 94fbe18e-031a-44df-bdce-3c9953b48361
📥 Commits

Reviewing files that changed from the base of the PR and between 77f88f7 and fbb9350.

📒 Files selected for processing: 1
  • src/server/game/Entities/Player/Player.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

📝 Walkthrough

For same-map teleports while on a transport, Player::TeleportTo now calculates and stores the destination’s transport-relative offset before sending teleport acknowledgments.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to fbb93

The teleport stores the destination’s transport-relative offset before acknowledgment, and subsequent transport updates consume that offset. No concrete merge-blocking behavior is evident; the change is mergeable with normal checks.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bloodfangx
bloodfangx force-pushed the fix/transport-passenger-teleport-offset branch from f7c0b20 to aabe6b4 Compare October 27, 2026 12:08
Teleporting on a transport (e.g. sitting on a chair on a boat) updated
world coordinates but left the passenger transport offset unchanged,
causing the player to snap back on the next transport tick.

Recompute the passenger offset from the teleport destination before
sending teleport packets so the player remains seated.

This branch has not been deployed

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

Labels

CORE Related to the core file-cpp Used to trigger the matrix build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant