mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
ensure entities are cleared at map change (fixes segfault)
This commit is contained in:
parent
b6e52faea8
commit
4c234c2c27
1 changed files with 10 additions and 0 deletions
|
@ -1117,7 +1117,16 @@ CL_Rotate_f (void)
|
|||
void
|
||||
CL_SetState (cactive_t state)
|
||||
{
|
||||
static const char *state_names[] = {
|
||||
"ca_disconnected",
|
||||
"ca_demostate",
|
||||
"ca_connected",
|
||||
"ca_onserver",
|
||||
"ca_active",
|
||||
};
|
||||
cactive_t old_state = cls.state;
|
||||
|
||||
Con_DPrintf ("CL_SetState (%s)\n", state_names[state]);
|
||||
cls.state = state;
|
||||
if (old_state != state) {
|
||||
if (old_state == ca_active) {
|
||||
|
@ -1134,6 +1143,7 @@ CL_SetState (cactive_t state)
|
|||
// entering active state
|
||||
VID_SetCaption (cls.servername);
|
||||
IN_ClearStates ();
|
||||
R_ClearEnts ();
|
||||
r_active = true;
|
||||
game_target = IMT_0;
|
||||
key_dest = key_game;
|
||||
|
|
Loading…
Reference in a new issue