// if text input mode is active, clear it
void multi_msg_text_flush()
{
	Multi_msg_text_enter = 0;
	Multi_msg_mode = MULTI_MSG_NONE;
	Multi_msg_stamp = -1;		

	// keep eating keys for a short period of time and unset any used control bits
	Multi_msg_eat_stamp = timestamp(350);
	control_config_clear_used_status();
	key_flush();
}
void multi_pause_close(int end_mission)
{
	if ( !Multi_paused )
		return;

	// set the standalonest
	if (Game_mode & GM_STANDALONE_SERVER) {
		std_debug_set_standalone_state_string("Game play");
	} else {
		// free the screen up
		if ( end_mission && (Multi_paused_screen_id >= 0) ) {
			gr_free_screen(Multi_paused_screen_id);
			Multi_paused_screen_id = -1;
		}

		if (Multi_paused_background >= 0) {
			bm_release(Multi_paused_background);
			Multi_paused_background = -1;
		}

		Multi_paused_window.destroy();		
		game_flush();

		// unpause all the music
		audiostream_unpause_all();	
	}

	// unpause beam weapon sounds
	weapon_unpause_sounds();

	// eat keys timestamp
	Multi_pause_eat = f2fl(timer_get_fixed_seconds());
	
	// reset timestamps
	multi_reset_timestamps();

	// clear out control config and keypress info
	control_config_clear_used_status();
	key_flush();

	Multi_paused = 0;
}
// if we still want to eat keys 
int multi_pause_eat_keys()
{
	// if the eat timestamp is negative, don't eat keys
	if(Multi_pause_eat < 0.0f){
		return 0;
	} 

	// if less than 1 second has passed, continue eating keys
	if((f2fl(timer_get_fixed_seconds()) - Multi_pause_eat) < 1.0f){
		nprintf(("Network","PAUSE EATING KEYS\n"));

		control_config_clear_used_status();
		key_flush();

		return 1;
	}

	// otherwise, disable the timestamp
	Multi_pause_eat = -1.0f;

	return 0;
}