a path search used in game client, written in c