readd old unitsync test.cpp, it's a good example code for lobby devs