************************************ Credits ****************************************
The original Expert game coders -- for releasing the original 3.2 expert source
Id software -- obvious reasons
Incinerator ---- wrote in damagedrop mode and several fixes.. maploop fix
Mazrim ---- general coding fixes --- pak file checking ... done

Inspirations...
	Q2 Expert community -- the players.. thanks

******************************* Install notes ****************************************
-----------------------Install Instructions..-----------------------------------------

the zip file includes:
filelist.txt is a directory listing of all the files in this package


Linux users
******** Note ----- before installing back up your current gamei386.so----------------
Just rename it to gamei386so.32 so you know what it was...

win32 users
---------------------------------------------------------------------
rename your existing gamex86.dll if you dont want to lose it
--------------------------------------------------------------------
Clean install
--------------
Follow the "expert.txt" instructions included in the 
quake2\expert3.3.2\docs folder

-----------------------------------------------------------------------
I have included the q2admin version 1.13 directory and all the if you 
want to use it just rename quake2\q2admin to quake2\release
-----------------------------------------------------------------------

*************************************************************************
I would suggest backing up your existing configuration folders..ie ctf/ctf,
ctf/dm, all your cfg files in ctf folder, and batch files.. the easiest way
is to copy the whole ctf folder to another backup folder like quake2/ctfbak
**************************************************************************

Unzip the files with winzip to the drive using folder names to unzip to
example : unzip to c:\ .. make sure use folder names is checked off

This will place all the new files in an quake2\expert3.3.2 folder , 
copy the contents or move the contents of the expert3.3.2 folder to ctf folder


Modify the .bat,.cfg files to your liking 
at the least the bat files need an ip change

Modify the .cfg files to your liking or pull the lines out you need and add 
them to your cfg file. This file should stay in ctf path.
******************************* Files included ***************************************
q2ctf.bat --- typical win32 commandline 
------------------------------------------------------------------------
cd ..
start quake2.exe +set game ctf +set dedicated 1 +set public 1 +set ip "127.0.0.1" +set port 27910 +exec exctf.cfg
-------------------------------------------------------------------
Linux commandline -- 
./quake2 +set game ctf +set ip "your server ip" +set port "27910" +set dedicated 1 
+set public 1 +exec exctf.cfg

exctf.cfg
Sample Configuration file to run the server with new features..

gamei386.so
Linux expert ctf version 3.3.1 ... modified by Incinerator[DKM] --- icq 40084883

damagedropdoc.htm --- describes the new ctf mode of play in detail with client/server 
commands and settings.. If you use this you should probably add something to your 
motd(Message of the day) to tell the users to bind the *dropflag* command.
This file is typically located in the quake2/ctf/ctf path. It may be different per
server. 
For more question about this I am at icq 40084883... or wmcincin@clanwmc.com

***************************************************************************************
                                   Additions made
******************************* Damagedrop CTF server *********************************
Read the enclosed html... Damagedropdocs.htm
***************************************************************************************

                                      Changes made
**************************  Sv prop -- map loop fix ***********************************
Modified the ExitLevel feature..
(This is the function called to change levels at the end of the game)

Currently this supports maps in pak files and maps in baseq2/maps folder and ctf/maps.

This Adds crash protection for map loop not being run or properly or maploop is missing 
completely. This basically will load the same map if the sv prop values for the maploop 
are missing instead of using the maps internal next map property value.. 
In an expert server this typically isnt used anyway..The original intent of the next 
map property in a map was for the original quake2 Mission paks.
(At least I would assume that). So, with that in mind the network play seems to benefit
from this in the respect that if an sv prop is spelled wrong or the 
***************************************************************************************

**************************** Added a new sv loadmap command ***************************
***************************************************************************************
****** This only supports maps that are in pak files and, files in baseq2/maps
******* as well as ctf/maps
**************************************************************************************
Usage on server console              --- sv loadmap mapname
Usage for rcon                       --- rcon password sv loadmap mapname

example ....                         --- rcon password sv loadmap q2ctf1
        - (the above will load q2ctf1 if its not in a pak file currently)

example of a bad map request         --- rcon sv loadmap q2cfgghjkgh 
	- the server will respond map not found

what this command does is checks to see if the map exists first before trying to open 
or change to a new map..so if a remote console user types in the wrong map name the 
server will not change to the map or crash because of a bad mapname.. It has been 
thoroughly tested on win32 systems and now finally on linux. 

**********************************    pullspeed  **************************************
This allows the grapple/hook pulling speed to be adjustable... i have tested this to 
as high as 20000 and as low as -20000 .. it works either way..
I dont recommend going past 700 or so for internet.. this may affect 
If the number is a negative number it will push you away from the hook..
USAGE ---
server console --- pullspeed number ----- example... pullspeed 420
rcon usage     --- rcon pullspeed number


This is a server only option can be positive or negative values -- default is 420
***************************************************************************************

********************************  Rapidfire fix *************************************** 
fixed spectator firing bug -- it is now a only useable when not in expert play mode
ie.  DM

***************************************************************************************
                                 AUTORESTART FEATURE 
***************************************************************************************
This is used in conjunction with several things.
2 new cvars made for the server

autorestart 0 or 1 		//default is 0
restartcfg "filename.cfg"  	//default is exctf.cfg

This tries  to restart a server where for some reason the server crashes.

It basically checks these 2 values listed above and reloads the server using the default
cfg script that initially loaded the server..

It is configurable in the the exp*.cfg files and is also in the ctfcycle.cfg files..
Autorestart 0 or 1 is set in the ctfcycle.cfg to resolve a problem with using the 
map command.

autorestart and restartcfg variables should both be present in the initial script cfg 
file that starts the server..if they are not it will simply never autorestart on 
server failures.

Heres an example.
you start the server using a batch file on a win32 machine.
the batch file does "+exec exctf.cfg" as its initial cfg file to run the server
inside the exctf.cfg it sets all the basic startup variables for the game server
in this file it should contain

autorestart 0 
restartcfg "exctf.cfg"  	//default is exctf.cfg

Note that the restartcfg pair has the cfg files filename..This tells the server 
when it shuts down to restart using that file as its restart settings information.

also when the first person connects to the server the ctfcycle.cfg file will load
Inside that file is the map properties for the maploop of the server and this variable
autorestart 1 

this enables the autorestart after the server has actually taken players. 
To disable restarts open the ctfcycle.cfg and change autorestart 1 to 
autorestart 0..
DO NOT DO IT IN THE EXPCTF.CFG FILE.. IT SHOULD ALWAYS STAY 0 IN THAT FILE..
AN ALTERNATIVE TO TURNING IT OFF IS USING autorestart 0 at the console or 
using "rcon pass autorestart 0" then do what you need to do.


------------------------------------------------------------------------------------------

I have included some new server aliases that will allow the server to be shutdown if that
is what you want to do..

The servers initial cfg file listed in your batch files to start the server is included 
in the cfg file that starts the server. 
For example, if the server runs exctf.bat and it calls exctf.cfg the 
restartcfg "exctf.cfg" should be set in it.. more documentation is 
included in the cfg files on this.. 

if you clear this value the server will just shutdown
I recommend against this..  

the autorestart 0 is set in the exctf.cfg on purpose. Leave this as is. 
Instead, change autorestart in ctf/ctfcycle.cfg to 0 to disable the 
autorestart features on server shutdown or do it on console typing autorestart 0.
I recommend server ops type the command "alias" at the console to see the new 
alias commands added to the server..
---------------------------------------------------------------------------
Basically they are as follows, and are already included in the startup files
----------------------------------------------------------------------------
//this will shutdown the server without restarting it
alias shutdown "autorestart 0;killserver"

//this will kill the server and quit q2
alias shutdownq2 "autorestart 0;killserver;quit"

alias killserver "shutdown"
//----------------------------------------------


Known Issues
---------------------------------------------------------------------------------------
There is a bug in either q2 or q2admin, or this dll that will cause the server to 
crash if you use rcon killserver.. 
the workaround for it is use rcon shutdown which uses the alias described above, and 
bypasses q2admins killserver before the dll can send the rcon user info from the server
killserver works properly from the server console.
---------------------------------------------------------------------------------------

Note to admins:
----------------------------------------------------------------------------
If you find or see something that isnt working right send an email to 
wmcincin@clanwmc.com and i will try to resolve the issue.
----------------------------------------------------------------------------
