Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new character on outpost causes inventory loss/character reset #13527

Open
1 of 2 tasks
UnhappyWithMyUsername opened this issue Mar 10, 2024 · 1 comment
Open
1 of 2 tasks
Assignees
Labels
Bug Something isn't working Code Programming task

Comments

@UnhappyWithMyUsername
Copy link

UnhappyWithMyUsername commented Mar 10, 2024

Disclaimers

  • I have searched the issue tracker to check if the issue has already been reported.
  • My issue happened while using mods.

What happened?

The Issue:

When dying in an outpost level type and creating a new character, your new character will spawn it, but will completely reset (spawn in as new again) after undocking from the outpost, causing you to lose all items you had in your inventory from that round. A video example can be found below. (We and especially the editor may have had a little too much fun)
https://youtu.be/_LGQGKwY2JI?si=yhEKxCLmDg0KMD7s

My guess for the cause:

I believe this happens because the outpost level type immediatly forces you into the respawn queue after death occured without asking instead of an opt-in system like in the LocationConnection type.
This process might cause the server to associate the client with its previous character, but loads it in with the data of the newly created one, thinking it is the old character since the respawn queue was already entered before the "create new" button was pressed.

Now the client is in a state where the character is seen as the old character by the server that should be replaced with a new character, despite the character having the new data already and thus is replaced by another new character in the next round which causes the inventory loss.

Potential fix:

Use the same opt-in system for respawning on the Outpost level type as it is used in the LocationConnetion type instead of forcing a respawn.
Also perhaps disable the "Create New" button when the client opted into the respawn queue with a notification to opt out of it before attempting to create a new character to prevent this bug potentially also happening in LocationConnection types?

Reproduction steps

  1. Start a multiplayer game.
  2. Kill your character and create a new one.
  3. After respawning as your new character, collect some items.
  4. Undock from the outpost.
  5. Observe your inventory (Or rather entire character) being reset after loading in.

Bug prevalence

Happens every time I play

Single player or multiplayer?

Multiplayer hosted using a dedicated server

-

No response

Version

v1.2.8.0 (Winter Update hotfix 2)

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

@Regalis11 Regalis11 added Bug Something isn't working Code Programming task labels Mar 14, 2024
@Regalis11 Regalis11 self-assigned this Mar 21, 2024
@Regalis11
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Code Programming task
Projects
None yet
Development

No branches or pull requests

2 participants