Server replacing the user when creating a match v38_4
Describe the bug When a match is hosted, through the Server in v38_4, the user 'Server' replaces the user that created the match.
This only occurs when a match is hosted directly through the server, and no issues occur when the game is connected through a direct IP address, from player to player.
To Reproduce Steps to reproduce the behavior:
- Connect to the server
- Host a match
- Go to the CO Selection screen
- See error
Expected behavior The User should be the creator of the match, and not be replaced by the server
Screenshots
Desktop (please complete the following information):
- OS: Windows/Linux
- Version Windows 10/Arch Linux
- Active Mods (Note: none vanilla mod problems want be investigated)
- Game Version: 38_4
Additional context Add any other context about the problem here.
I have been performing tests, and the issue seems to affect Linux exclusively. The problem does not occur on V37_2, so my suspicion is that the refactoring done to create the AppImage might have had an impact on this, since the code was primarily focused on Linux. @Robosturm Could you please check what impact the code from this pull request onward, could have on the way the server slaves are spawned? https://github.com/Robosturm/Commander_Wars/pull/1848
I believe that this might be the root of the issue, unfortunately I am not well versed on CMake, to pinpoint the exact lines of why this happens.
These three commits are the only ones I can think of for the rest any commit made by RimiKanokawa might be an issue as well, but I don't really know what he did with building/deplyoing CoW for Linux so I can't help you. 42d10fbb79649dac12bd55ef3abb141054ea6ee9 9104e632f3edff02bf56b004398e33cd0503bc2e 6571a9d7184d4fb1a8d38624089b5249399efc0a
I have been testing further with @Lymia From her conjecture, it is unrelated to the refactoring of the code, to add an AppImage. However it's from that build onwards that I have noticed the issue, she's been working on a fix. We have concluded that both versions the one with the defined path in the ini, and the pathless one (windows style dumping of the folders and files), have the same problem. I will dig through the code to see if there's anything I can find as suspicious.
One of these two commits is involved, but not the root cause of this bug: https://github.com/Robosturm/Commander_Wars/commit/9104e632f3edff02bf56b004398e33cd0503bc2e https://github.com/Robosturm/Commander_Wars/commit/42d10fbb79649dac12bd55ef3abb141054ea6ee9 Reverting them causes the server player slot to show up as "Human" instead of the server's name, meaning one of these code changes is responsible for putting the server player in. Still investigating.
I've ruled out https://github.com/Robosturm/Commander_Wars/commit/42d10fbb79649dac12bd55ef3abb141054ea6ee9. I'm investigating https://github.com/Robosturm/Commander_Wars/commit/9104e632f3edff02bf56b004398e33cd0503bc2e now, and looking for root cause.
@Robosturm Do you know if https://github.com/Robosturm/Commander_Wars/commit/9104e632f3edff02bf56b004398e33cd0503bc2e could be the source of this problem? Lymia's contributions have been ruled out, we tested the binaries after her pull requests.
Probably but as mentioned I can't reproduce it . And the sync code during player selection is a complete mess and would need a redesign. Currently I'm not in a mood to work on CoW so the main thing I do is bug fixing aka maintenance