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