/[hegemonie]/hegemonie/Network/NetGameList.m
ViewVC logotype

Diff of /hegemonie/Network/NetGameList.m

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by thunder, Mon May 26 10:21:38 2003 UTC revision 1.2 by nicov, Tue May 27 10:33:59 2003 UTC
# Line 49  Line 49 
49  @implementation NetGameList  @implementation NetGameList
50    
51  /**  /**
52   * Initialise NetGameList with the existing games. These games are researched   * Initialize NetGameList.
  * on the local network.  
53   */   */
54  - (id) init  - (id) init
55  {  {
# Line 59  Line 58 
58    if (self != nil)    if (self != nil)
59      {      {
60        _gameList = AUTORELEASE ([NSMutableArray array]);        _gameList = AUTORELEASE ([NSMutableArray array]);
       [self searchGames];  
61      }      }
62        
63    return self;    return self;
# Line 117  Line 115 
115      {      {
116        NSArray *partyList = [[server partyList] allValues];        NSArray *partyList = [[server partyList] allValues];
117        unsigned int i;        unsigned int i;
118        for (i = 1; i <= [partyList count]; i++)        for (i = 0; i < [partyList count]; i++)
119          [self _addGameIDWithParty: [partyList objectAtIndex: i]          [self _addGameIDWithParty: [partyList objectAtIndex: i]
120                           withHost: [[[NetConnection currentConnection]                           withHost: [[[NetConnection currentConnection]
121                                        sendPort] host]];                                        sendPort] host]];
# Line 147  Line 145 
145                                               initGame: game];                                               initGame: game];
146    if (sendPort != nil)    if (sendPort != nil)
147      {      {
 //       NetInfosClient *inf = [[gameID party] clientWithName: playerName];  
 //       HgPlayerState *playerState;  
 //       playerState = [inf playerState];  
         
148        NetConnection *cnx = [NetConnection        NetConnection *cnx = [NetConnection
149                               connectionWithReceivePort: receivePort                               connectionWithReceivePort: receivePort
150                                                sendPort: sendPort];                                                sendPort: sendPort];
# Line 161  Line 155 
155                                           initWithProxy: serverInfosClient                                           initWithProxy: serverInfosClient
156                                           withGame: game]);                                           withGame: game]);
157        [cnx setRootObject: client];        [cnx setRootObject: client];
158          
159          [serverInfosClient createProxy];
160          [serverInfosClient delegateClient];
161        return client;        return client;
162      }      }
163    else    else

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26