ericw wrote:At first I struggled a bit to prevent the console from re-appearing and scrolling away when the map change happens in a demo. Tried various things like putting a SCR_BeginLoadingPlaque() + SCR_EndLoadingPlaque() pair in Host_Reconnect_f(), which sort of worked, but not on timedemo's.
I've been fighting that for a long a time.
(Ironically, the code you have above is real close what the next Mark V uses ...]
Code: Select all
/*
==================
Host_Reconnect_f
This command causes the client to wait for the signon messages again.
This is sent just before a server changes levels
==================
*/
// This can have 2 different scenarios. Entry might be at 0, in that case 4 should clear plaque
//If signon is 4, that is death or changelevel.
void Host_Reconnect_f (void)
{
// Baker: Clear sound so if new map takes a long to load isn't playing ...
S_ClearBuffer (); // Baker: Clear sound so if new map takes a long to load isn't playing ...
if (cls.demoplayback)
{
Con_DPrintf("Demo playing; ignoring reconnect\n");
SCR_EndLoadingPlaque (); // reconnect happens before signon reply #4
return;
} else
{
SCR_BeginLoadingPlaque_Force_Transition ();
cls.signon = 0; // need new connection messages
}
}
The loading plague is complicated and annoying the way original Quake code was written.
Most engines avoid the issue by instant or high console speed -- by avoid, I mean don't deal with the issue because it hard to address and not rewarding.
And it is complicated because of the messed up and redundant pathways the Quake source code does for everything.
1) Timedemo
2) Demo
3) Coop play / Online play
4) Single player
5) Load game, reconnect, save game, die during play, single player -> new game
But to verify, I'll also need to try some other conditions ...
6) Multiplayer deathmatch reconnect.
7) Multiplayer deathmatch reconnect, failed (can happen)
8 ) Single player changelevel failed.
(sigh ... there are extra variations of those too --- connected, error, already running a map, start from menu)
[The myriad of situations are a bit annoying ...]
Anyway, in the next Mark V I haven't encountered a situation it handles incorrectly. Almost no engine I've seen has it 100% perfect so far.