]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/xonotic-map-screenshot
1c65379c9f31cba0f8b63e3a1031c5b7a570bec3
[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         +'vid_fullscreen 0' \
13         +'exec effects-ultimate.cfg' \
14         "$@" \
15         +'r_motionblur 0' \
16         +'r_damageblur 0' \
17         +'r_letterbox -1' \
18         +'r_drawviewmodel 0' \
19         +'crosshair 0' \
20         +'sv_cheats 2' \
21         +'set catchme "catchme_"' \
22         +"alias catchme_$count \"quit\"" \
23         +'alias "autoscreenshot" "$catchme; set catchme \"${catchme}x\"; impulse 911; defer 1 \"screenshot; autoscreenshot\""' \
24         +'alias cl_hook_gamestart_all "cmd join; defer 1 god; defer 2 noclip; defer 3 autoscreenshot"' \
25         +"defer \"$watchdog\" quit" \
26         +"map \"$map\"" \
27         +'timelimit 0' \
28         +'fraglimit 0'