Hack to get SearchNearbyBuildings to work on dedicated server. Send the code wholesale. Kind of hacky.
Add hack comment.
Works in SP. Almost in MP.
Consolidate some stuff. Try for making this work on multiplayer server.
Merge in surrender functionality.
Cleanup some code. Also make surrendering an already surrendered unit secure them.