mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-31 19:57:06 +01:00
fix rematch initiated by a guest: needs to be host in the game it
creates.
This commit is contained in:
parent
08e6c2b358
commit
1f3959fc71
1 changed files with 5 additions and 1 deletions
|
@ -292,9 +292,14 @@ make_rematch( GtkAppGlobals* apg, const CommonGlobals* cGlobals )
|
||||||
|
|
||||||
/* Create new game. But has no addressing info, so need to set that
|
/* Create new game. But has no addressing info, so need to set that
|
||||||
aside for later. */
|
aside for later. */
|
||||||
|
const CommsCtxt* comms = cGlobals->game.comms;
|
||||||
CurGameInfo gi = {0};
|
CurGameInfo gi = {0};
|
||||||
gi_copy( MPPARM(cGlobals->util->mpool) &gi, cGlobals->gi );
|
gi_copy( MPPARM(cGlobals->util->mpool) &gi, cGlobals->gi );
|
||||||
gi.gameID = 0; /* clear so will get generated */
|
gi.gameID = 0; /* clear so will get generated */
|
||||||
|
if ( !!comms ) {
|
||||||
|
gi.serverRole = SERVER_ISSERVER;
|
||||||
|
gi.forceChannel = 0;
|
||||||
|
}
|
||||||
game_saveNewGame( MPPARM(cGlobals->util->mpool) &gi,
|
game_saveNewGame( MPPARM(cGlobals->util->mpool) &gi,
|
||||||
cGlobals->util, &cGlobals->cp, stream );
|
cGlobals->util, &cGlobals->cp, stream );
|
||||||
|
|
||||||
|
@ -304,7 +309,6 @@ make_rematch( GtkAppGlobals* apg, const CommonGlobals* cGlobals )
|
||||||
|
|
||||||
/* If it's a multi-device game, save enough information with it than when
|
/* If it's a multi-device game, save enough information with it than when
|
||||||
opened it can invite the other device[s] join the rematch. */
|
opened it can invite the other device[s] join the rematch. */
|
||||||
const CommsCtxt* comms = cGlobals->game.comms;
|
|
||||||
if ( !!comms ) {
|
if ( !!comms ) {
|
||||||
XWStreamCtxt* stream = mem_stream_make( MPPARM(cGlobals->util->mpool)
|
XWStreamCtxt* stream = mem_stream_make( MPPARM(cGlobals->util->mpool)
|
||||||
cGlobals->params->vtMgr,
|
cGlobals->params->vtMgr,
|
||||||
|
|
Loading…
Add table
Reference in a new issue