;;
esac
fi
+
+ # map preview for menu and map vote screen genertaed from the first auto-screenshot
+ # input image must be in 4:3 format (1024x768 is ok), output image has to be 512x512
+ convert ~/.xonotic/data/screenshots/$M-000000.jpg -scale 1:1 -scale 512 ~/.xonotic/data/screenshots/$M.jpg
+
) 2>&1 | tee ~/.xonotic/data/autoscreenshot.log
good=false
if mv ~/.xonotic/data/screenshots "$M-$blobhash"; then
# convert count to unary
count=`yes x | head -n "$count" | tr -cd x`
+# NOTES:
+# some settings are used to generate the very same screenshots if map geometry doesn't change
+# - cl_animate_items 0 makes items static
+# - slowmo 10 is used to quickly let powerups and superweapons spawn
+
./all run \
-nocrashdialog \
-nosound \
-noconfig \
+ -width 1024 \
+ -height 768 \
+'locksession 0' \
+'scr_screenshot_timestamp 0' \
+'vid_fullscreen 0' \
+'exec effects-ultra.cfg' \
"$@" \
+'cl_welcome 0' \
+ +'cl_animate_items 0' \
+ +'g_pickup_respawntime_powerup 0' \
+ +'g_pickup_respawntimejitter_powerup 0' \
+ +'g_pickup_respawntime_superweapon 0' \
+ +'g_pickup_respawntimejitter_superweapon 0' \
+'sv_precacheplayermodels 0' \
+'cl_hidewaypoints 1' \
+'cl_movement 0' \
+'set catchme "catchme_"' \
+"alias catchme_$count quit" \
+'alias NARF "sv_cmd nextframe cl_cmd nextframe sv_cmd nextframe cl_cmd nextframe $*"' \
- +'alias ZORT "god; NARF EGAD"' \
+ +'alias ZORT "slowmo 1; god; NARF EGAD"' \
+'alias EGAD "noclip; NARF POIT"' \
+'alias POIT "$catchme; set catchme ${catchme}x; impulse 911; NARF TROZ"' \
+'alias TROZ "screenshot; NARF POIT"' \
- +'alias cl_hook_gamestart_all "defer 1.1 join; defer 2 ZORT"' \
+ +'alias cl_hook_gamestart_all "slowmo 10; defer 1.1 join; defer 2 ZORT"' \
+"defer \"$watchdog\" quit" \
+"map \"$map\"" \
+'timelimit 0' \