pioneerspacesim/pioneer — pull request #1567 by fluffyfreak (2012-10-03 13:11:53+00:00)
Title: Factions bug fix for #1562

Fixes the issues identfied in issue #1562

Added a BAD_FACTION_IDX enum type.
StarSystem now uses the BAD_FACTION_IDX.
Bug fix #1562:
GetNearestFactionIndex now checks to see if a system in custom and then the govType of the SystemPath index that it's actually building and returns either a matching faction, the BAD_FACTION_IDX, or if no govType was set for the custom system it assigns one according the the usual distance test.