|
|
|
|
@ -789,6 +789,9 @@ BOOL NetInit(BOOL bSinglePlayer, BOOL *pfExitProgram)
|
|
|
|
|
|
|
|
|
|
while (1) { |
|
|
|
|
*pfExitProgram = FALSE; |
|
|
|
|
#ifdef HELLFIRE |
|
|
|
|
pfile_create_player_description(NULL, 0); |
|
|
|
|
#endif |
|
|
|
|
SetRndSeed(0); |
|
|
|
|
sgGameInitInfo.dwSeed = time(NULL); |
|
|
|
|
sgGameInitInfo.bDiff = gnDifficulty; |
|
|
|
|
@ -806,7 +809,9 @@ BOOL NetInit(BOOL bSinglePlayer, BOOL *pfExitProgram)
|
|
|
|
|
ProgramData.initdata = &sgGameInitInfo; |
|
|
|
|
ProgramData.initdatabytes = sizeof(sgGameInitInfo); |
|
|
|
|
ProgramData.optcategorybits = 15; |
|
|
|
|
#ifndef HELLFIRE |
|
|
|
|
ProgramData.lcid = 1033; /* LANG_ENGLISH */ |
|
|
|
|
#endif |
|
|
|
|
memset(&plrdata, 0, sizeof(plrdata)); |
|
|
|
|
plrdata.size = sizeof(plrdata); |
|
|
|
|
memset(&UiData, 0, sizeof(UiData)); |
|
|
|
|
@ -862,8 +867,8 @@ BOOL NetInit(BOOL bSinglePlayer, BOOL *pfExitProgram)
|
|
|
|
|
nthread_send_and_recv_turn(0, 0); |
|
|
|
|
SetupLocalCoords(); |
|
|
|
|
multi_send_pinfo(-2, CMD_SEND_PLRINFO); |
|
|
|
|
gbActivePlayers = 1; |
|
|
|
|
plr[myplr].plractive = TRUE; |
|
|
|
|
gbActivePlayers = 1; |
|
|
|
|
if (sgbPlayerTurnBitTbl[myplr] == FALSE || msg_wait_resync()) |
|
|
|
|
break; |
|
|
|
|
NetClose(); |
|
|
|
|
@ -889,7 +894,7 @@ BOOL multi_init_single(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info
|
|
|
|
|
int unused; |
|
|
|
|
|
|
|
|
|
if (!SNetInitializeProvider(0, client_info, user_info, ui_info, &fileinfo)) { |
|
|
|
|
SErrGetLastError(); |
|
|
|
|
DERROR(); |
|
|
|
|
return FALSE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -914,7 +919,7 @@ BOOL multi_init_multi(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info,
|
|
|
|
|
type = 0x00; |
|
|
|
|
if (gbSelectProvider) { |
|
|
|
|
if (!UiSelectProvider(0, client_info, user_info, ui_info, &fileinfo, &type) |
|
|
|
|
&& (!first || SErrGetLastError() != STORM_ERROR_REQUIRES_UPGRADE || !multi_upgrade(pfExitProgram))) { |
|
|
|
|
&& (!first || DERROR() != STORM_ERROR_REQUIRES_UPGRADE || !multi_upgrade(pfExitProgram))) { |
|
|
|
|
return FALSE; |
|
|
|
|
} |
|
|
|
|
#ifndef HELLFIRE |
|
|
|
|
|