mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
create new comms object if needed for non-first game
This commit is contained in:
parent
6baa887b77
commit
712ec202d2
2 changed files with 10 additions and 4 deletions
|
@ -103,8 +103,9 @@ game_makeNewGame( MPFORMAL XWGame* game, CurGameInfo* gi,
|
|||
} /* game_makeNewGame */
|
||||
|
||||
void
|
||||
game_reset( MPFORMAL XWGame* game, CurGameInfo* gi, XP_U16 gameID,
|
||||
CommonPrefs* cp, TransportSend sendproc, void* closure )
|
||||
game_reset( MPFORMAL XWGame* game, CurGameInfo* gi, XW_UtilCtxt* util,
|
||||
XP_U16 gameID, CommonPrefs* cp, TransportSend sendproc,
|
||||
void* closure )
|
||||
{
|
||||
XP_U16 i;
|
||||
|
||||
|
@ -122,6 +123,10 @@ game_reset( MPFORMAL XWGame* game, CurGameInfo* gi, XP_U16 gameID,
|
|||
} else {
|
||||
comms_reset( game->comms, gi->serverRole != SERVER_ISCLIENT );
|
||||
}
|
||||
} else if ( gi->serverRole != SERVER_STANDALONE ) {
|
||||
game->comms = comms_make( MPPARM(mpool) util,
|
||||
gi->serverRole != SERVER_ISCLIENT,
|
||||
sendproc, closure );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -75,8 +75,9 @@ typedef struct XWGame {
|
|||
void game_makeNewGame( MPFORMAL XWGame* game, CurGameInfo* gi,
|
||||
XW_UtilCtxt* util, DrawCtx* draw, XP_U16 gameID,
|
||||
CommonPrefs* cp, TransportSend sendproc, void* closure);
|
||||
void game_reset( MPFORMAL XWGame* game, CurGameInfo* gi, XP_U16 gameID,
|
||||
CommonPrefs* cp, TransportSend sendproc, void* closure );
|
||||
void game_reset( MPFORMAL XWGame* game, CurGameInfo* gi, XW_UtilCtxt* util,
|
||||
XP_U16 gameID, CommonPrefs* cp, TransportSend sendproc,
|
||||
void* closure );
|
||||
|
||||
void game_makeFromStream( MPFORMAL XWStreamCtxt* stream, XWGame* game,
|
||||
CurGameInfo* gi,
|
||||
|
|
Loading…
Add table
Reference in a new issue