some fixes from zeromod-sauerbraten