*** The Impulse Commands Patch ***

by Peter "Czar" Williams

********
	Because this patch uses Windows function calls it is 
nonportable. Too bad. (I know it works on Win95; NT, probably;
3.1, maybe.)
********

	This patch adds what I hope will be a cool new functionality
to Quake 2. It allows you to add your own custom impulses to any game
that supports it. Niggling little client side features that bother 
you can be fixed in every game you play!

	The Impulse Commands Patch works by loading a second DLL into 
memory. This DLL, impx86.dll, contains separate functions that handle
impulses. Two simple examples are included; one echoes back "Impulse 
xxx executed," and the other duplicates the impulses from Quake (with
a few differences, see the readme in the subdir "qcmds"). But the source 
frame is there for any person who knows the QII architecture to modify 
it however they like.

GETTING IT TO RUN:
	Copy gamex86.dll to <yourQuake2dir>\impulse. Copy the 
impx86.dll from the subdir "echo" to <yourQuake2dir>\impulse\echo AND 
to <yourQuake2dir>\impulse (this is to suppress errors when the patch
tries to load the DLL from the default subdir impulse. Copy the
impx86.dll from the subdir "qcmds" to <yourQuake2dir>\impulse\qcmds. 
Run quake2 with a game of impulse. To play with the "echo" impulses,
type "impdir impulse\echo" on the console and go to a new map. To play
with the "qcmds" impulses, type "impdir impulse\qcmds" on the console
and go to a new map.
	To add a new impulse DLL, copy it to another subdir of 
<yourQuake2dir>\impulse and change the impdir to the appropriate value.
	Logically minded people may note that you don't strictly have
to put your impx86.dll in subdirs of impulse; subdirs of <yourQuake2dir>
will also work. I trust you can figure out what to change "impdir" to.

TECHNICALITIES:
	"cmd impulse x" triggers impulse x. Same format as Quake I 
except there's a "cmd " in front. Don't forget it; nothing happens if
you type only "impulse x," so you may mistakenly think the impulse has
been activated when it hasn't.
	You can change the directory the game looks for the impx86.dll 
in with the console variable "impdir" (defaults to "impulse"). This is
basically like a gamedir for the impulse command. If you're not sure 
what to enter, the patch tells what file it's trying to open on 
startup. The value of "impdir" is added on to the directory of Quake 2
and then "\impx86.dll" is appended to it. For example, an impdir of
"impulse\qcmds" will mean the patch tries to open (on my system)
"c:\games\quake2\impulse\qcmds\impx86.dll".
	See the file "notes.txt" in the src directory to see info on
the source of the three dll's.

CHEATING / MALICIOUS DLLS:
	The answer in short is "hell yes." The impulse DLL's are 
entirely client-side, so Internet deathmatch could get a little hairy.
I have no idea how to fix this so I guess you'll have to rely on the
goodness of human nature.
	Malicious DLL's could be written for the Impulse Commands 
Patch. Again, no way to root them out unless source is included -- the
basic source code is only about 15 lines so finding malicious code is
easy. Without the source, all you can do is rely on yer noggin. I'd 
stay away from patches that say "do cmd 1mpuls3 1 to s33 t}{3 l33t3st 
fx 3v3r!!!!!!!!!!!!!!!!"

BUGS:
	I've noticed that the DLL startup code gets called as often as
three times when a level loads. I can't explain it, but it doesn't affect
the performance of the patch.
	Otherwise there's very complete errorchecking in all the source
included. Other DLL's, however, may not be as thorough (sp? Feels 
wrong) as I.

LEGAL:
	All files in this patch are copyright (C) 1998 Peter Williams.
However, you may use any file contained in this archive however you
wish, so long as 1) Appropriate credit is given (My definition of
appropriate: "This code/DLL/readme/whathaveyou is copied from the 
Impulse Commands Patch by Peter Williams"), and 2) You accept all legal
responsibilities from your use of this archive, or someone else's use 
of what you provided. 
	This archive may not be distributed without my permission, 
whether for profit or not. This archive MUST MUST MUST MUST MUST be
distributed with all files it originally contained. Those files are:
	.\readme.txt
	.\gamex86.dll
	.\echo\impx86.dll
	.\echo\readme.txt
	.\qcmds\impx86.dll
	.\qcmds\readme.txt
	.\src\notes.txt
	.\src\game\p_client.c
	.\src\game\g_cmds.c
	.\src\game\g_main.c
	.\src\game\impulse.h
	.\src\echo\i_main.c
	.\src\echo\game.h
	.\src\echo\q_shared.h
	.\src\echo\g_local.h
	.\src\echo\impulse.h
	.\src\echo\impx65.def
	.\src\qcmds\i_main.c
	.\src\qcmds\game.h
	.\src\qcmds\q_shared.h
	.\src\qcmds\g_local.h
	.\src\qcmds\impulse.h
	.\src\qcmds\impx65.def
Other files associated with this project MIGHT be given from me to you
at request.

---
Peter "Czar" Williams
petewill@world.std.com
1/13/98