Urban Terror Forums: xqf: Automatically switch between ioquake3 and idsoftware quake3 - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

xqf: Automatically switch between ioquake3 and idsoftware quake3 Rate Topic: -----

#1 User is offline   undead Icon

  • Account: undead
  • Joined: 06-June 10
  • Posts: 199

Posted 01 January 2007 - 05:49 AM

This is more for the QA people but non-QA may want to do this as well right now.

The ioquake3 project took the quake3 source code and made lots of fixes and enhancements to it.  Unfortunately evenbalance (punkbuster) doesn't support it because it is open source.

However, you can use it on non-punkbuster servers.  It will also work with standalone urban terror once it is released.

I have a somewhat complicated setup because I have many engines (ioquake3 for i386, ioquake3 for athlon, ioquake3 i386 for standalone, ioquake3 athlon for standalone, idsoftware quake3).  I created a common directory where all the engines can share the same 3.7 and QA code.  I use the same configs across all of them.

In xqf, I can't join a server with different engines easily.  I wanted to use idsoftware's engine on PB servers and ioquake3 (because I like it better) on non-PB servers.  So I created this script.

In xqf, replace in the games menu the path to quake3.  Put that path in this script.


#!/bin/sh

#
# Script for XQF to choose which engine to use.  Requires qstat.
# If the server isn't running punkbuster, then use ioquake3.
# Otherwise, use idsoftware's engine.
#
# Note: On debian, qstat has been renamed to quakestat.  Replace
# that below if you are not using Debian.
#
# To use this, change the paths to your quake3 locations (idsoftware and ioquake3).
# Then setup xqf to execute this instead of quake3.
#

set -e

# Example command issued by xqf:
# /bin/sh /srv/games/quake3/engines/idsoftware/quake3 +connect IP:PORT +set cl_punkbuster 1 +set fs_game q3ut3 +set com_hunkmegs 208 +set com_zonemegs 32 +set com_soundmegs 20 +set cg_precachedmodels 20

# Check the arguments (go until $# = 1 because there must be at least 2 arguments)
SERVER="";
SAVED_ARGS="$*";
while (($# > 1)); do
  if [ X"$1" = X"+connect" ]; then
    # Right after +connect is the IP:PORT.
    SERVER="$2";
  fi
  shift;
done

if [ X"$SERVER" = "X" ]; then
  echo "Error!  You must provide a command with +connect IP:PORT to this script";
  echo "Usage: $0 <quake3 commands> +connect IP:PORT <more q3 commands>"
  exit 1;
fi

# Get the rules from the server
echo "Requesting rules from server $SERVER"
SETTINGS=`quakestat -R -q3s $SERVER | tail -1`;

# Search for the server variable that enables punkbuster
PUNKBUSTER="`echo $SETTINGS | sed -e 's/.*,?sv_punkbuster=([0-9]),?.*/1/i'`"

# Be conservative.  Only use ioquake3 if sv_punkbuster is 0 or if it is not present.
if [ X"$PUNKBUSTER" = X"0" -o ! X"`echo $PUNKBUSTER | grep '='`" = "X" ]; then
  echo "This server is NOT running punkbuster.  Executing ioquake3"
  cd "/srv/games/quake3/engines/icculus_athlon";
  ./ioquake3.i386 $SAVED_ARGS
else
  echo "This server is running punkbuster.  Executing idsoftware quake3"
  cd "/srv/games/quake3/engines/idsoftware";
  ./quake3.x86 $SAVED_ARGS
fi

exit $?



#2 User is offline   Woekele Icon

  •   former FS member   
    Public Relations
  • Account: woekele
  • Country:
  • Joined: 26-January 10
  • Posts: 11,575

Posted 01 January 2007 - 06:38 PM

Nice :)

#3 User is offline   MrSentry Icon

  • Account: mrsentry
  • Main tag: 6th|
  • Country:
  • Joined: 28-February 10
  • Posts: 940

Posted 04 January 2007 - 04:11 PM

omg your white and nerdy  :mrgreen:

#4 User is offline   L3mMinG (old) Icon

  • Joined: 20-February 04
  • Posts: 862

Posted 29 March 2007 - 10:39 AM

I'm so gonna install this once you add battle eye support (and if I don't wanna wait I'll take a crack at it) :)

#5 User is offline   AKGRIZZLY (old) Icon

  • Joined: 07-May 06
  • Posts: 4,898
  • LocationAlaska

Posted 30 March 2007 - 03:40 AM

That $hT is so a reason to fully give in to linux....sigh I have too many winders yo.

bullet_loaderAdvertisement

#6 User is offline   mitsubishi Icon

  • Account: mitsubishi
  • Country:
  • Joined: 28-February 10
  • Posts: 13,481

Posted 30 March 2007 - 05:32 PM

I can't run id's quake3 at all with sound since it doesn't work with my usb headphones and a guy trying to help for a bug report knows worse english than me so meh

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942