[1.1.107] Player being renamed on load
Posted: Wed May 15, 2024 3:02 pm
When a multiplayer game is saved and then loaded in singleplayer, if you do not exist in the save game then the player with index 1 will be renamed to match your name. This is inconsistent with loading single player save games where you play as index 1 but the player is not renamed.
This results in a scenario where `on_player_joined_game` is raised with a player who's name was never raised by `on_player_created`.
This causes issues where on join has a dependency on actions performed within on created, such as modifying the global table.
It also contradicts previous comments about player names not changing.
Reproduction Steps:
This results in a scenario where `on_player_joined_game` is raised with a player who's name was never raised by `on_player_created`.
This causes issues where on join has a dependency on actions performed within on created, such as modifying the global table.
It also contradicts previous comments about player names not changing.
Reproduction Steps:
- Start a new multiplayer game.
- Save the game (A).
- Change your name in the settings.
- Load (SP) save A and note that you are playing as index 1 without being renamed. (expected)
- Host (MP) save A and note that you are playing as index 2 as a new player. (expected)
- Save the game (B).
- Load (SP) save B and note that you are playing as index 2 as the same player. (expected)
- Change your name in the settings.
- Load (SP) save B and note that you are playing as index 1 but have been renamed. (unexpected)