memononen/recastnavigation — pull request #18 by jackpoz (2014-02-19 21:06:22+00:00)
Title: Fix rcMergePolyMeshes() ignoring portals of input meshes.

Copy the portals from input meshes on border to the output mesh.
Since https://github.com/memononen/recastnavigation/commit/1de5e2f1198aace213a57f19736d9867f7c6f217 tiles built using meshes merged with rcMergePolyMeshes() don't have any portals even if neighbor polygons are passed correctly. This happens because when meshes are merged the portals are totally ignored and they will be set to the default 0xffff "border" value.

This is the output of a tile built with a 25x25 meshes grid without these changes, notice how there are no portals on the borders:
![map 571 2718 no portals dt 7](https://f.cloud.github.com/assets/1153754/2211685/fbf7d9ce-99a8-11e3-958b-249b32527263.png)

This is the output with the changes of this PR, notice how there are portals on the borders:
![map 571 2718 portals dt 7](https://f.cloud.github.com/assets/1153754/2211703/317c1e3e-99a9-11e3-948d-2b332d87940b.png)

This is a path starting from a tile, passing through a portal to another tile and back to the starting tile with another portal:
![map 571 2718 portals dt 7 path](https://f.cloud.github.com/assets/1153754/2211726/54d80212-99a9-11e3-98ad-cda75167099c.png)

Feel free to adjust the code to your codestyle of choice or even totally change it in case there's a more elegant solution.