﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,phab_field
6422,Often no passable path on unknown map with 2 players,Langbart,,"A problem was noticed by `rollieoo` on a certain map, both opponents cannot reach each other.
* Forum: [https://wildfiregames.com/forum/topic/68685-two-halves-map/ Two halves map] (21/Jan/22)
==== to reproduce
* Set up a game
  * Player: 2
  * Maptype: Random
  * Map: Unknown
  * Landscape: Passes
* try to get your units across the mountain, often this won't work
[[Image(unknown_passes.jpg, 600px, center)]]

example: 

{{{
~/0ad/binaries/system/pyrogenesis -conf=mod.enabledmods:""mod public"" -quickstart -autostart=""random/unknown"" -autostart-seed=1563851758  -autostart-size=256 -autostart-player=-1
}}}


==== bisect
* It was not possible for me to find the changeset number.
* In a quick test in A24b, the mountain was overcomeable, but if you try a few times, the problem could also occur there.
* The problem also occurs in A23b.

==== solution
A simple solution would be to adjust the map creation for 2 players `|| numPlayers == 2` so that there is always a lake in between.
[[Image(unknown_passes_lake.jpg, 600px, center)]]

[https://code.wildfiregames.com/source/0ad/browse/ps/trunk/binaries/data/mods/public/maps/random/unknown.js$656 Line 656] in Unknown.js 

{{{
#!js lineno=656
	if (randBool(2/5) *|| numPlayers == 2*)
	{
		g_Map.log(""Create central lake"");
		createArea(
			new ClumpPlacer(diskArea(fractionToTiles(0.1)), 0.7, 0.1, Infinity, mapCenter),
			[
				new SmoothElevationPainter(ELEVATION_SET, waterHeight, 3),
				new TileClassPainter(clWater)
			]);
	}
}}}",defect,new,Should Have,Alpha 26,Maps,,,,
