Bug 55747 - Players list not updated when removing AI
Summary: Players list not updated when removing AI
Status: RESOLVED FIXED
Alias: None
Product: boson
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: HI grave
Target Milestone: ---
Assignee: The Boson Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-09 17:09 UTC by Rivo Laks
Modified: 2003-10-22 16:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rivo Laks 2003-03-09 17:09:02 UTC
Version:            (using KDE 3.1.1)
Installed from:    compiled sources
Compiler:          gcc version 3.2.1
OS:          Linux (i686) release 2.4.18

Start 2 clients, start network game on the first one and join it with the other one. Then add AI on the first client and then remove it. Players list is not updated on the second client.

Rivo
Comment 1 Andreas Beckermann 2003-03-13 15:22:26 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 
 
Comment 2 Andreas Beckermann 2003-03-17 19:41:30 UTC
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 
 
Comment 3 Felix Seeger 2003-05-05 20:42:39 UTC
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.  
Comment 4 Rivo Laks 2003-10-22 16:15:18 UTC
Looks like it has been fixed in CVS. At least it works fine here.

Rivo