[GH-ISSUE #5075] User being reset after logging back into the world #1543

Closed
opened 2026-11-02 15:47:51 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @kira-horizon[bot] on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5075

Version: nightly-2026-10-31-9d979ca · OS: not given (copied from the report)

What I did: created a hardcore world, played for like 5 minutes, quit the game and i logged back
What happened: I found myself back at the spawn with empty inventory, however the stuff i did in the world didnt reset
What I expected: I expected the game wouldnt do that wtf
Does it happen every time?: Idk
Horizon version: as the game shows it (Nightly · ): nightly-2026-10-31-9d979ca
OS, CPU, GPU:

Reported on Discord by ares in #horizon-bugs · Discord thread
Tags: gameplay

Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.

Originally created by @kira-horizon[bot] on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5075 **Version:** nightly-2026-10-31-9d979ca · **OS:** not given <sub>(copied from the report)</sub> > What I did: created a hardcore world, played for like 5 minutes, quit the game and i logged back > What happened: I found myself back at the spawn with empty inventory, however the stuff i did in the world didnt reset > What I expected: I expected the game wouldnt do that wtf > Does it happen every time?: Idk > Horizon version: as the game shows it (Nightly · ): nightly-2026-10-31-9d979ca > OS, CPU, GPU: Reported on Discord by **ares** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1566036673559535706) Tags: gameplay <sub>Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.</sub><!-- kira -->
bsakaguchi 2026-11-02 15:47:51 +07:00
Author
Owner

@baltikaa9 commented on GitHub (Oct 31, 2026):

It's the same in survival.

<!-- gh-comment-id:6542260278 --> @baltikaa9 commented on GitHub (Oct 31, 2026): It's the same in survival.
Author
Owner

@mulareal commented on GitHub (Oct 31, 2026):

🤖 Agent: This is the same root cause as #5065 (single-player integrated server worlds were calling Level::write_without_player instead of Level::write) — a fix is up in #5092.

<!-- gh-comment-id:6542677341 --> @mulareal commented on GitHub (Oct 31, 2026): 🤖 Agent: This is the same root cause as #5065 (single-player integrated server worlds were calling Level::write_without_player instead of Level::write) — a fix is up in #5092.
Author
Owner

@ludovic111 commented on GitHub (Oct 31, 2026):

🤖 Agent: Cause and fix, verified in the real game.

Cause: #4866 made the world save skip the player file (players/data/<uuid>.dat) on dedicated servers, but it tested options.dedicated, which the single-player server thread sets too. So in single player the world (blocks, mobs) was saved but your own player (position, inventory, health, XP, game mode) never was. It affects the Nightlies 7635280, 7aa0e28 and 9d979ca; 1da354b and older are fine. The in-frame mode (--in-frame) and dedicated servers aren't affected.

Fix: #5092 by @mulareal writes the player file again for single player (and keeps a dedicated server's world save from touching it). Tested: Save and Quit, then reopen keeps the position and inventory; a dedicated server keeps them over leave/rejoin and a restart. It is queued to merge and ships in the next Nightly. #5105 adds a check that reopens a world and compares the players, so this can't come back unnoticed.

Your data: the loss happened when saving, so the fix can't bring it back. What you did as a player on those Nightlies wasn't written to disk. A world you already had comes back with the player as the last older build saved it; a world created on these Nightlies starts at spawn with an empty inventory. Your world changes are all saved.

<!-- gh-comment-id:6542919858 --> @ludovic111 commented on GitHub (Oct 31, 2026): 🤖 Agent: Cause and fix, verified in the real game. **Cause:** #4866 made the world save skip the player file (`players/data/<uuid>.dat`) on dedicated servers, but it tested `options.dedicated`, which the single-player server thread sets too. So in single player the world (blocks, mobs) was saved but your own player (position, inventory, health, XP, game mode) never was. It affects the Nightlies 7635280, 7aa0e28 and 9d979ca; 1da354b and older are fine. The in-frame mode (`--in-frame`) and dedicated servers aren't affected. **Fix:** #5092 by @mulareal writes the player file again for single player (and keeps a dedicated server's world save from touching it). Tested: Save and Quit, then reopen keeps the position and inventory; a dedicated server keeps them over leave/rejoin and a restart. It is queued to merge and ships in the next Nightly. #5105 adds a check that reopens a world and compares the players, so this can't come back unnoticed. **Your data:** the loss happened when saving, so the fix can't bring it back. What you did as a player on those Nightlies wasn't written to disk. A world you already had comes back with the player as the last older build saved it; a world created on these Nightlies starts at spawn with an empty inventory. Your world changes are all saved.
Author
Owner

@kira-horizon[bot] commented on GitHub (Oct 31, 2026):

Also reported on Discord by Dinner: Discord thread

What I did:
Played the game and collected items in the inventory.
Changed the gamemode from the one set at world creation.
Exited the game and re-entered it.

What happened:
After re-entering the game, the inventory is completely cleared, the player returns to spawn, and the gamemode changes back to the one that was set at creation. Player's buildings dont disappear

What I expected:
After re-entering the game, the inventory should be preserved, the player should stay at the last position, and the gamemode should remain as it was before exiting.

Does it happen every time?
Yes.

Horizon version: nightly-2026-10-31-9d979ca

os: windows 11
CPU: I7 2600
GPU: GTX 180

<!-- gh-comment-id:6543887593 --> @kira-horizon[bot] commented on GitHub (Oct 31, 2026): Also reported on Discord by **Dinner**: [Discord thread](https://discord.com/channels/1559227979002028052/1566079230834638991) > What I did: > Played the game and collected items in the inventory. > Changed the gamemode from the one set at world creation. > Exited the game and re-entered it. > > What happened: > After re-entering the game, the inventory is completely cleared, the player returns to spawn, and the gamemode changes back to the one that was set at creation. Player's buildings dont disappear > > What I expected: > After re-entering the game, the inventory should be preserved, the player should stay at the last position, and the gamemode should remain as it was before exiting. > > Does it happen every time? > Yes. > > Horizon version: nightly-2026-10-31-9d979ca > > os: windows 11 > CPU: I7 2600 > GPU: GTX 180 - [2026-10-31_14-18-17.mp4](https://cdn.discordapp.com/attachments/1566079230834638991/1566079233074143444/2026-10-31_14-18-17.mp4?ex=6ae73c71&is=6ae5eaf1&hm=40c30b20c56980a6f5e92200f905c04d7dc722ec062a3592875b5f8d64c848be&) <!-- kira -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1543
No description provided.