Revision: 1487
http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1487&view=rev
Author: rorthomas
Date: 2010-07-22 19:26:13 +0000 (Thu, 22 Jul 2010)
Log Message:
-----------
no gaps in MP gui
Modified Paths:
--------------
trunk/source/main/gui_mp.cpp
Modified: trunk/source/main/gui_mp.cpp
===================================================================
--- trunk/source/main/gui_mp.cpp 2010-07-22 02:23:23 UTC (rev 1486)
+++ trunk/source/main/gui_mp.cpp 2010-07-22 19:26:13 UTC (rev 1487)
@@ -281,27 +281,31 @@
// add remote players
int res = net->getClientInfos(clients);
if(res) return 1;
- for(int i = 0; i < MAX_PEERS; i++, slotid++)
+ for(int i = 0; i < MAX_PEERS; i++)
{
client_t *c = &clients[i];
player_row_t *row = &player_rows[slotid];
- if(!c->used)
+ // only count up slotid for used slots, so there are no gap in
the list
+ if(c->used)
{
+ // used
+ slotid++;
+ try
+ {
+ updateSlot(row, &c->user, false);
+ } catch(...)
+ {
+ }
+ } else
+ {
+ // not used, hide everything
row->flagimg->setVisible(false);
row->playername->setVisible(false);
row->statimg->setVisible(false);
row->usergoimg->setVisible(false);
row->userTruckOKImg->setVisible(false);
row->userTruckOKRemoteImg->setVisible(false);
- continue;
}
- try
- {
- updateSlot(row, &c->user, false);
- } catch(...)
- {
- continue;
- }
}
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel