Browse Source

engine: add missing Sequence_Init and Sequence_OnLevelLoad calls

pull/2/head
Alibek Omarov 2 years ago
parent
commit
d8355a651f
  1. 5
      engine/client/cl_main.c
  2. 3
      engine/server/sv_init.c

5
engine/client/cl_main.c

@ -23,6 +23,7 @@ GNU General Public License for more details.
#include "library.h" #include "library.h"
#include "vid_common.h" #include "vid_common.h"
#include "pm_local.h" #include "pm_local.h"
#include "sequence.h"
#define MAX_TOTAL_CMDS 32 #define MAX_TOTAL_CMDS 32
#define MAX_CMD_BUFFER 8000 #define MAX_CMD_BUFFER 8000
@ -239,6 +240,9 @@ void CL_SignonReply( void )
if( cl.proxy_redirect && !cls.spectator ) if( cl.proxy_redirect && !cls.spectator )
CL_Disconnect(); CL_Disconnect();
cl.proxy_redirect = false; cl.proxy_redirect = false;
if( cls.demoplayback )
Sequence_OnLevelLoad( clgame.mapname );
break; break;
} }
} }
@ -3123,6 +3127,7 @@ void CL_Init( void )
VID_Init(); // init video VID_Init(); // init video
S_Init(); // init sound S_Init(); // init sound
Voice_Init( VOICE_DEFAULT_CODEC, 3 ); // init voice Voice_Init( VOICE_DEFAULT_CODEC, 3 ); // init voice
Sequence_Init();
// unreliable buffer. unsed for unreliable commands and voice stream // unreliable buffer. unsed for unreliable commands and voice stream
MSG_Init( &cls.datagram, "cls.datagram", cls.datagram_buf, sizeof( cls.datagram_buf )); MSG_Init( &cls.datagram, "cls.datagram", cls.datagram_buf, sizeof( cls.datagram_buf ));

3
engine/server/sv_init.c

@ -19,6 +19,7 @@ GNU General Public License for more details.
#include "library.h" #include "library.h"
#include "voice.h" #include "voice.h"
#include "pm_local.h" #include "pm_local.h"
#include "sequence.h"
#if XASH_LOW_MEMORY != 2 #if XASH_LOW_MEMORY != 2
int SV_UPDATE_BACKUP = SINGLEPLAYER_BACKUP; int SV_UPDATE_BACKUP = SINGLEPLAYER_BACKUP;
@ -1011,6 +1012,8 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba
SV_InitEdict( ent ); SV_InitEdict( ent );
} }
Sequence_OnLevelLoad( sv.name );
// heartbeats will always be sent to the id master // heartbeats will always be sent to the id master
NET_MasterClear(); NET_MasterClear();

Loading…
Cancel
Save