mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed crashing of server side demos due to client_entergame() being processed
This commit is contained in:
parent
658cd5a78f
commit
f817cb2319
|
@ -337,7 +337,7 @@ enum
|
|||
|
||||
/* the game snapshots are modifiable by the game */
|
||||
SNAPSTORAGE snapshot_storage;
|
||||
static SNAPSTORAGE_HOLDER *snapshots[NUM_SNAPSHOT_TYPES];
|
||||
static SNAPSTORAGE_HOLDER *snapshots[NUM_SNAPSHOT_TYPES] = {0, 0};
|
||||
|
||||
static int recived_snapshots = 0;
|
||||
static char snapshot_incomming_data[MAX_SNAPSHOT_SIZE];
|
||||
|
@ -599,11 +599,13 @@ static void client_on_enter_game()
|
|||
|
||||
void client_entergame()
|
||||
{
|
||||
if(state == CLIENTSTATE_DEMOPLAYBACK)
|
||||
return;
|
||||
|
||||
/* now we will wait for two snapshots */
|
||||
/* to finish the connection */
|
||||
client_send_entergame();
|
||||
client_on_enter_game();
|
||||
/*netclient_flush(net);*/
|
||||
}
|
||||
|
||||
void client_connect(const char *server_address_str)
|
||||
|
|
Loading…
Reference in a new issue