[quake] 01/04: quake3: prefer /usr/lib/quake/* as fs_basepath, and support the demo
Simon McVittie
smcv at debian.org
Fri Jan 23 01:05:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository quake.
commit 0e87f3ebc778dfc516bafcb2c9543c1801784ac8
Author: Simon McVittie <smcv at debian.org>
Date: Fri Jan 23 00:00:02 2015 +0000
quake3: prefer /usr/lib/quake/* as fs_basepath, and support the demo
---
debian/changelog | 11 +++++++++++
quake3.in | 44 +++++++++++++++++++++++++++++++++++---------
2 files changed, 46 insertions(+), 9 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 9720d90..106fb71 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+quake (10) UNRELEASED; urgency=medium
+
+ * quake3: prefer to load game data from /usr/lib/quake3/base
+ or /usr/lib/quake3/ta, where ioquake3 can provide native-code game modules
+ - this requires ioquake3 (>= 1.36+u20150114+dfsg1-1~) and
+ quake3*-data built by game-data-packager (>= 40)
+ * quake3: experimental support for loading the demo data
+ - the same requirements apply
+
+ -- Simon McVittie <smcv at debian.org> Thu, 22 Jan 2015 23:48:36 +0000
+
quake (9) experimental; urgency=low
* quake3.desktop: describe Q3 as an ActionGame, not an ArcadeGame
diff --git a/quake3.in b/quake3.in
index 2b849fe..2c1d540 100644
--- a/quake3.in
+++ b/quake3.in
@@ -9,16 +9,14 @@ IOQ3BINARY=@IOQ3BINARY@
# q3a or openarena
IOQ3DOTDIR=q3a
-BASEPATH="/usr/share/games/quake3"
ENGINE="/usr/lib/ioquake3/${IOQ3BINARY}"
+BASEGAME="baseq3"
+BASEPATH="/usr/share/games/quake3"
DEBUGGER="$QUAKE3_DEBUGGER"
-
-# the defaults mostly apply
-CVARS="+set com_standalone 0"
-CVARS="$CVARS +set fs_basepath $BASEPATH"
-
-QUIET=0
+DEMO=
+PAKS="0 1 2 3 4 5 6 7 8"
+QUIET=
EXCUSE="\
Quake III Arena ${IOQ3ROLE} wrapper for Debian\n\
@@ -29,6 +27,8 @@ Usage: ${IOQ3SELF} [OPTION]...\n\
-q, --quiet\t\tDisable console output\n\
+<internal command>\tPass commands to the engine\n"
+CVARS="+set com_standalone 0"
+
while [ "$1" != "" ]; do
case "$1" in
-h|--help)
@@ -39,6 +39,10 @@ while [ "$1" != "" ]; do
CVARS="$CVARS +set ttycon 0"
QUIET=1
;;
+ --demo)
+ BASEPATH="/usr/lib/quake3/demo"
+ DEMO=1
+ ;;
*)
break
;;
@@ -46,9 +50,31 @@ while [ "$1" != "" ]; do
shift
done
+if [ -n "$DEMO" ]; then
+ BASEPATH="/usr/lib/quake3/demo"
+elif [ -e "/usr/lib/quake3/ta/missionpack/pak0.pak" ]; then
+ BASEPATH="/usr/lib/quake3/ta"
+elif [ -e "/usr/lib/quake3/base/baseq3/pak0.pak" ]; then
+ BASEPATH="/usr/lib/quake3/base"
+elif [ -e "$BASEPATH/baseq3/pak0.pak" ]; then
+ :
+elif [ -e "/usr/lib/quake3/demo/demoq3/pak0.pak" ]; then
+ BASEPATH="/usr/lib/quake3/demo"
+ DEMO=1
+fi
+
+if [ -n "$DEMO" ]; then
+ CVARS="$CVARS +set com_homepath .q3ademo +set com_basegame demoq3"
+ CVARS="$CVARS +set sv_pure 0 +set vm_ui 0 +set vm_cgame 0 +set vm_game 0"
+ require="0"
+ basegame=demoq3
+fi
+
+CVARS="$CVARS +set fs_basepath $BASEPATH"
+
# sanity check: the engine doesn't cope well with missing data
-for i in 0 1 2 3 4 5 6 7 8; do
- if test -f $BASEPATH/baseq3/pak$i.pk3; then
+for i in $paks; do
+ if test -f $BASEPATH/$basegame/pak$i.pk3; then
:
else
if test "$IOQ3ROLE" = client; then
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/quake.git
More information about the Pkg-games-commits
mailing list