Skip to content

Fix mounted and shrunken NPC position sync - #41

Open
nightNR wants to merge 1 commit into
mtwango:dark-paradisefrom
nightNR:fix/pet-mount-movement-on-ws
Open

Fix mounted and shrunken NPC position sync#41
nightNR wants to merge 1 commit into
mtwango:dark-paradisefrom
nightNR:fix/pet-mount-movement-on-ws

Conversation

@nightNR

@nightNR nightNR commented Aug 19, 2026

Copy link
Copy Markdown

Description

Fixes position synchronization issues affecting mounted and shrunken NPCs during world saves and garbage collection.

The hidden NPC representation of an equipped mount could remain at a stale position after its rider moved. During garbage collection, the server attempted to
correct this through the normal movement pipeline. This could execute region, location, and environmental triggers for the hidden NPC, potentially killing or
releasing the mount and automatically dismounting its rider.

The changes:

  • Keep the hidden mount NPC synchronized with its rider.
  • Relocate disconnected mounted or shrunken NPCs without executing gameplay movement triggers.
  • Preserve world-save parity when moving disconnected NPCs between sectors.
  • Save ridden NPCs using the position of their linked figurine or mounted rider.
  • Improve diagnostic logging when a ridden NPC cannot be synchronized.

———

Type of Change

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation update
  • Build / CI change
  • Other (please describe)

———

Related Issues

None.

———

Testing

  • Tested on a clean SphereServer instance with latest ScriptPack
  • No regressions in existing functionality
  • Added or updated tests (not applicable; no automated test coverage was added)

Manual testing confirmed the previous behavior where the hidden mount NPC remained at a stale position after its rider moved. Sector sleeping, activation,
garbage collection, and background world-save scenarios were also exercised.

———

Checklist

  • Code compiles successfully
  • Changes follow the project's coding style
  • No unrelated code was modified
  • Documentation updated where necessary
  • This PR does not introduce breaking changes

———

Additional Notes

The fix intentionally bypasses normal region, room, environmental, and location triggers when synchronizing disconnected mounted or shrunken NPCs. This
relocation is internal bookkeeping and should not behave as normal gameplay movement.

The changelog has been updated to document the corrected world-save, garbage-collection, and mount-position behavior.

@nightNR

nightNR commented Aug 19, 2026

Copy link
Copy Markdown
Author

Tento fix je postaveny len na teoretickych zisteniach a v lokalnom prostredi neviem nasimulovat povodny problem.. Zrejme ma suvis s velkostou save, mnozstvom aktivnych zon atd. ALe mal by riesit stav, kedy hracom zmiznu jazditka alebo sa z aktivuju zonove triggery f.e. v zonach kde zabija jazditka po zosadnuti (f.e. Ankh 3 koniec) pocas WorldSave(alebo garbageCollect).. chcelo by to skusit s realnym save pripadne PTR .. podobne ako fix Death() processu

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant