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

Skirmish AI hosts leaving will break crudeplayerlist upon reloading #5366

Open
Arch-Shaman opened this issue Oct 12, 2024 · 1 comment · May be fixed by #5368
Open

Skirmish AI hosts leaving will break crudeplayerlist upon reloading #5366

Arch-Shaman opened this issue Oct 12, 2024 · 1 comment · May be fixed by #5368

Comments

@Arch-Shaman
Copy link
Contributor

Replication steps:
0. Create a lobby with two players: A (host) and B. Player B hosts a circuit AI or other skirmish AI. Player A hosts a null AI.

  1. Start the game, plop as usual.
  2. Have player B leave the game.
  3. Reload the playerlist

Error:

[t=09:45:30.746776][f=0000736] [cawidgets.lua] Error: Error in Initialize(): [string "LuaUI/Widgets/chili_old/controls/object.lua"]:247: Chili: There is already a control with the name 1 in Player List!
[t=09:45:30.746807][f=0000736] [cawidgets.lua] Error: Removed widget: Chili Crude Player List

Explanation:
Skirmish AIs that leave are no longer considered AI by the player list and the Spring API no longer says they're AI. This gives them a team leader ID of -1 which causes it to fall back on a value given to it by initLeaderID. This teamrulesparam is created by this line of code.

Solution:
Have the same gadget store if a teamID is AI and fall back to it on L603.

@Arch-Shaman Arch-Shaman changed the title Skirmish AI hosts leaving will break crudeplayerlist upon lreloading Skirmish AI hosts leaving will break crudeplayerlist upon reloading Oct 12, 2024
@Arch-Shaman
Copy link
Contributor Author

#5367 (adding this as a reference)

Arch-Shaman added a commit to Arch-Shaman/Zero-K that referenced this issue Oct 12, 2024
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 a pull request may close this issue.

1 participant