mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-12 07:04:15 +00:00
Fix demo playback if cl_loadpaused is 1.
Demos are special. To the client they're more or less the same as normal maps, the only difference is that the client never joines the server. So we're never getting the first valid frame txpaht indicates the end of the connection process. We're using that one to drop out of pause mode... As a result the client stays in pause mode forever and "hangs". Work around this by entering pause mode only if the local server is in state ss_game. Demos are ss_demo. There're some more states for cinematics, pictures, etc. Since the player can't save in those states it should be save not check them.
This commit is contained in:
parent
52b5698014
commit
70a94f759f
1 changed files with 8 additions and 6 deletions
|
@ -627,11 +627,13 @@ CL_ConnectionlessPacket(void)
|
||||||
attack and in most levels the starting area in unreachable by
|
attack and in most levels the starting area in unreachable by
|
||||||
monsters and free from environmental effects.
|
monsters and free from environmental effects.
|
||||||
|
|
||||||
Com_Serverstate() returns > 1 if the server is local, otherwise
|
Com_Serverstate() returns 2 if the server is local and we're
|
||||||
0. If it's a local server, maxclients aus either 0 (for single
|
running a real game and no timedemo, cinematic, etc. The 2 is
|
||||||
player), or 2 to 8 (coop and deathmatch) if we're reaching this
|
taken from the server_state_t enum value 'ss_game'. If it's a
|
||||||
code. For remote servers it's always 1. So this should trigger
|
local server, maxclients aus either 0 (for single player), or
|
||||||
only if it's a local single player server.
|
2 to 8 (coop and deathmatch) if we're reaching this code.
|
||||||
|
For remote servers it's always 1. So this should trigger only
|
||||||
|
if it's a local single player server.
|
||||||
|
|
||||||
Since the player can load savegames from a paused state (e.g.
|
Since the player can load savegames from a paused state (e.g.
|
||||||
through the console) we'll need to communicate if we entered
|
through the console) we'll need to communicate if we entered
|
||||||
|
@ -639,7 +641,7 @@ CL_ConnectionlessPacket(void)
|
||||||
the server) or if it was already there.
|
the server) or if it was already there.
|
||||||
|
|
||||||
Last but not least this can be disabled by cl_loadpaused 0. */
|
Last but not least this can be disabled by cl_loadpaused 0. */
|
||||||
if (Com_ServerState() || (Cvar_VariableValue("maxclients") <= 1))
|
if (Com_ServerState() == 2 && (Cvar_VariableValue("maxclients") <= 1))
|
||||||
{
|
{
|
||||||
if (cl_loadpaused->value)
|
if (cl_loadpaused->value)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue