]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/xonotic-map-screenshot
aee32664d44ed3e003409fb44fcb201c3910e0ad
[xonotic/xonotic.git] / misc / tools / xonotic-map-screenshot
1 #!/bin/sh
2
3 map=$1; shift
4 count=$1; shift
5 watchdog=$1; shift
6
7 # convert count to unary
8 count=`yes x | head -n "$count" | tr -cd x`
9
10 ./all run \
11         -nosound \
12         +'locksession 0' \
13         +'scr_screenshot_timestamp 0' \
14         +'vid_fullscreen 0' \
15         +'exec effects-ultimate.cfg' \
16         +'vid_soft 1' \
17         "$@" \
18         +'r_motionblur 0' \
19         +'r_damageblur 0' \
20         +'r_letterbox -1' \
21         +'r_drawviewmodel 0' \
22         +'crosshair 0' \
23         +'sv_cheats 2' \
24         +'set catchme "catchme_"' \
25         +"alias catchme_$count \"quit\"" \
26         +'alias "autoscreenshot" "$catchme; set catchme \"${catchme}x\"; impulse 911; defer 2 \"screenshot; autoscreenshot\""' \
27         +'alias cl_hook_gamestart_all "cmd join; defer 1 god; defer 2 noclip; defer 3 autoscreenshot"' \
28         +"defer \"$watchdog\" quit" \
29         +"map \"$map\"" \
30         +'timelimit 0' \
31         +'fraglimit 0'