Attempt to translate darkplaces engine to c++