﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	phab_field
3554	Crash when joining a game with a map that was not found locally	elexis		"If you join a multiplayer match or start a replay for a map that you don't have in your repository, the game will crash:

{{{
<p class=""error"">ERROR: CCacheLoader failed to find archived or source file for: ""maps/scenarios/elephant_test.xml""</p>
<p class=""error"">ERROR: CCacheLoader failed to find archived or source file for: ""maps/scenarios/elephant_test.xml""</p>
<p class=""error"">ERROR: CCacheLoader failed to find archived or source file for: ""maps/scenarios/elephant_test.xml""</p>
<p class=""error"">ERROR: Failed to load map maps/scenarios/elephant_test.pmp: File_OpenFailed</p>
}}}

* Showing a warning as in #3553 doesn't help with that, as one might join the match when a valid map was selected and the host selecting a non-existing map afterwards.

* Especially if a random random-map is selected, the host will chose any map that it has without checking if the clients have them.

The client should check before starting the game whether it actually has that map and then returning cleanly to the menu.

In case of starting a game with a randomly chosen map that a client doesn't have, that client should send the not-ready signal to the host. The host should in return chose another map. The client should then send the ready signal again.

Probably some amount of refactoring could be done in `gamesetup.js` and `functions_utility.js`, as there are many functions related to loading mapdata, which could be moved to a new file `functions_map.js`.
"	defect	closed	Nice to Have		UI & Simulation	duplicate			
