#!/bin/sh map=$1; shift count=$1; shift watchdog=$1; shift # convert count to unary count=`yes x | head -n "$count" | tr -cd x` ./all run \ -nosound \ +'vid_fullscreen 0' \ +'exec effects-ultimate.cfg' \ "$@" \ +'r_motionblur 0' \ +'r_damageblur 0' \ +'r_letterbox -1' \ +'r_drawviewmodel 0' \ +'crosshair 0' \ +'sv_cheats 2' \ +'set catchme "catchme_"' \ +"alias catchme_$count \"quit\"" \ +'alias "autoscreenshot" "$catchme; set catchme \"${catchme}x\"; impulse 911; defer 2 \"screenshot; autoscreenshot\""' \ +'alias cl_hook_gamestart_all "cmd join; defer 1 god; defer 2 noclip; defer 3 autoscreenshot"' \ +"defer \"$watchdog\" quit" \ +"map \"$map\"" \ +'timelimit 0' \ +'fraglimit 0'