OK fcambus@ Initial diff by Tom Murphy who also helped debugging later iterations. Thanks! When daemonized as soon as STDIN goes away q2ded detects that and stops waiting for input, this causes a CPU spin loop generating high server loads by frequent calls to clock_gettime. By adding daemon_flags to the rc.d script we flip the busywait flag which causes q2ded to use a mechanism based on nanosleep that is significantly lighter on load and has no noticeable impact on performance for players. While here we also set the dedicated flag as there is no point to run the dedicated server outside of debugging without it. This diff is tweaked compared to ports@ with gamedir being removed. This final change has been OK'ed off list also by fcambus@. The reasoning for that final change is as follows: We do not need gamedir/datadir as we already set SYSTEMWIDE and SYSTEMDIR during compilation. This solves pointing the game at the pak files. Normally however we would still need to cd into the game directory for dlopen to properly load renderers and game.so. Upstream however has a backwards compatibility mechanism for game.so (so older mods work) where all paths where game files are stored is searched for game.so dlopen. This includes SYSTEMDIR and that makes q2ded work without having to cd into the binary directory. Since the server itself does not need to load any renderers that is enough to have a fully functioning q2ded.
$OpenBSD: README,v 1.5 2019/04/26 07:29:21 ajacoutot Exp $ +----------------------------------------------------------------------- | Running ${PKGSTEM} on OpenBSD +----------------------------------------------------------------------- To run yquake2 on OpenBSD, you need the original Quake II data files and the 3.20 patch. Follow the steps outlined on: https://github.com/yquake2/yquake2/blob/master/README.md when done copy the baseq2 directory to ${TRUEPREFIX}/share/yquake2/baseq2/ or ~/.yq2/baseq2/ and start up yquake2.