diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 7278cc12..a6fab3ed 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2145,6 +2145,7 @@ static void CL_ConnectToServer(boolean viams) } while (!(cl_mode == CL_CONNECTED && (client || (server && nodewaited <= pnumnodes)))); + F_StartWaitingPlayers(); DEBFILE(va("Synchronisation Finished\n")); displayplayer = consoleplayer; @@ -3878,9 +3879,8 @@ FILESTAMP // Update the nettics nettics[node] = realend; - // Don't do anything for packets of type NODEKEEPALIVE? - if (netconsole == -1 || netbuffer->packettype == PT_NODEKEEPALIVE - || netbuffer->packettype == PT_NODEKEEPALIVEMIS) + // This should probably still timeout though, as the node should always have a player 1 number + if (netconsole == -1) break; // If a client sends a ticcmd it should mean they are done receiving the savegame @@ -3890,6 +3890,12 @@ FILESTAMP /// \todo Use a separate cvar for that kind of timeout? freezetimeout[node] = I_GetTime() + connectiontimeout; + // Don't do anything for packets of type NODEKEEPALIVE? + // Sryder 2018/07/01: Update the freezetimeout still! + if (netbuffer->packettype == PT_NODEKEEPALIVE + || netbuffer->packettype == PT_NODEKEEPALIVEMIS) + break; + // Copy ticcmd G_MoveTiccmd(&netcmds[maketic%BACKUPTICS][netconsole], &netbuffer->u.clientpak.cmd, 1); diff --git a/src/d_main.c b/src/d_main.c index 1d78c10c..241659ec 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -388,6 +388,8 @@ static void D_Display(void) case GS_WAITINGPLAYERS: // The clientconnect drawer is independent... + // I don't think HOM from nothing drawing is independent... + F_WaitingPlayersDrawer(); case GS_DEDICATEDSERVER: case GS_NULL: break; diff --git a/src/f_finale.c b/src/f_finale.c index c38cd2db..3ea2e0bf 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -58,6 +58,9 @@ static patch_t *ttkart; // *vroom* KART static patch_t *ttcheckers; // *vroom* KART static patch_t *ttkflash; // flash screen +static patch_t *driver[2]; // Driving character on the waiting screen +static UINT8 *waitcolormap; // colormap for the spinning character + static void F_SkyScroll(INT32 scrollspeed); // @@ -1031,6 +1034,50 @@ void F_TitleDemoTicker(void) keypressed = false; } +// ================ +// WAITINGPLAYERS +// ================ + +void F_StartWaitingPlayers(void) +{ + INT32 i; + INT32 randskin; + spriteframe_t *sprframe; + + wipegamestate = GS_TITLESCREEN; // technically wiping from title screen + finalecount = 0; + + randskin = M_RandomKey(numskins); + waitcolormap = R_GetTranslationColormap(randskin, skins[randskin].prefcolor, 0); + + for (i = 0; i < 2; i++) + { + sprframe = &skins[randskin].spritedef.spriteframes[(6+i) & FF_FRAMEMASK]; + driver[i] = W_CachePatchNum(sprframe->lumppat[1], PU_LEVEL); + } +} + +void F_WaitingPlayersTicker() +{ + finalecount++; + + // dumb hack, only start the music on the 1st tick so if you instantly go into the map you aren't hearing a tic of music + if (finalecount == 2) + S_ChangeMusicInternal("WAIT2J", true); +} + +void F_WaitingPlayersDrawer(void) +{ + UINT32 frame = (finalecount % 8) / 4; // The game only tics every other frame while waitingplayers + INT32 flags = V_FLIP; + const char *waittext1 = "You will join"; + const char *waittext2 = "the next race..."; + V_DrawFill(0, 0, 320, 200, 31); + V_DrawCreditString((160 - (V_CreditStringWidth(waittext1)>>1))<>1))<width / 2, 150<