Summary: | Players list not updated when removing AI | ||
---|---|---|---|
Product: | [Applications] boson | Reporter: | Rivo Laks <rivolaks> |
Component: | general | Assignee: | The Boson Team <boson-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | grave | ||
Priority: | HI | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Rivo Laks
2003-03-09 17:09:02 UTC
Thats a very evil KGame bug, good found! The ID of the new AI player is *not* set when IdAddPlayer is sent through network, so it still has ID 0 when both KGame clients receive the (saved) player. But ID 0 means that it is a local player, i.e. the KGame object assign an ID to the new player. Of course these IDs will differ on both clients, as the player IDs are composed of a player ID and the KGame ID. I think the fix would be to call KPlayer::setId() before actually sending IdAddPlayer, but I am not sure whether there might be unexpected side effects. I'm on it (and have sent a mail to another KGame author on this). CU Andi UPDATE: This bug is now fixed in current KGame. Update to KDE CVS if you want it to be fixed asap. I do not yet close this bug, as it must be fixed for other KGame versions too, i.e. I will write a workaround in our code for that. CU Andi I am running cvs head and the ai player even doesn't reach the server. I can add 4 ai players for a 2 Player game. Both are not visible on the server. Removing works for all except the last ai player, and hard adding/removing results in a crash. Looks like it has been fixed in CVS. At least it works fine here. Rivo |