email: cmoore@shn.net

** pre readme stuff note **

	Yes, this is just for linux, and yes, I am one of those 
"I-Hate-Micro$oft" types.  But at the same time, and in the intrest of cross
platform compatibility (yadda yadda yadda), at the end of this readme is a 
GNU diff of my source tree.  You can, if i'm not mistaken, get a dos version
of patch from prep.ai.mit.edu:/pub/gnu/MicrosPorts/something or in the djgpp
distribution, apply the patch, and recompile it yourself.  OR you can send 
me email at cmoore@shn.net and i'll get a friend to compile it up and
and put the .dll up for ftp.  I dont hate microsoft people... well... not all
of them... i just dont like microsoft.


	1) First, the disclaimer:
		I am not responsible for anything this lib might do to your 
system.  PERIOD.  I would in no way try to harm anyones system by distributing 
bad libraries, but at the same time, I cannot be responsible for problems 
caused by this library.  If you dont think i'm legit, see the bottom for 
a `diff -uNr` of my source tree and you can get the source, etc. and compile
it yourself.  Fair enough? :)

	2) Next, the copyright etc. stuff

	You ABSOLUTELY CANNOT under any circumstances distribute this library 
on media of ANY form for commercial purposes without my expressed written 
consent.  I have source code, patches, and the uuencoded library on printed 
paper sent in sealed postmarked envelopes dated today or my work.  If you 
are a copyright lawyer/assistant reading this you know what that means.  I only
say this because there has been some questionable dealings by an unnamed 
company releasing a TC with free/share/whatever ware levels that they did not 
have permission to distribute and they are making money off of them.
	You CAN however, do whatever you want with my source, patches, etc. 
as long as you dont make money off of it.  And you can do so without my
written consent.
	I think it's sad that free software contributors have to write such 
lengthy disclaimers these days to keep themselves out of court or to keep some 
software company from screwing them over.

	3) Ok, with that out of the way, here's the lowdown:

	This is essentially just the same shared lib that compiles when you 
get the source tree from id and the makefile off of whichever ftp or website.
  The difference is, that there are some added cvars and here's a list:

	blaster_d
	shotgun_d
	machine_d
	chain_d
	grenade_d
	grenade_dr
	grenade_rd
	rocket_d
	rocket_dr
	rocket_rd
	rail_d
	bfg_d
	bfg_dr
	bfg_rd


	The _d controls the damage value of the weapon.  The _dr is the 
damage_radius and _rd is radius_damage.  In single player, the result is 
obvious.  In multiplayer, this allows the server to set the damage and 
radius, etc. of weapons on the fly.
	By default, the values are at 0.  Which makes the default values 
for damage, etc. active.  By setting them at >0, you activate my changes.

Here's a description of the libs...

	gamei386.so-opts -- compiled with -fomit-frame-pointer and 
			-funroll-loops for (maybe) a little speed increase.
			Some systems have a problem with this.  Mine, has a
			big problem with -O4 so i keep the optimization flag
			at 2. (AMDK6).

	gamei386.so	 -- compiled with the defaults in the distributed 
			    makefile.  And should work with any machine that
			    quake2 will run on.

	In case someone has a problem with these libs, they were compiled on
a RedHat 5.0 box with libc 6.  You really *really* shouldn't have a problem 
though.  And if you do, there's a 99% chance it isn't the lib.  But, if it 
doesn't work, let me know.  And let me know more than "It doesn't work on my
machine."  Like, libc version, ld.so version, installation, etc.


	INSTALLATION

	*I* just symlink /usr/games/quake2/baseq2/gamei386.so to wherever
I have the library when i want to use it and i dont have any problems.  The 
best way however, would probably be to make a directory in your quake2 dir 
and then use quake2 +set game <whatever the directory name is>.

	I made this because I wanted to be able to adjust the damage of all
of the weapons in quake2 for lan partys, and do it without having to restart
the game.  Some levels are just too close up to have such powerful weapons, 
others need a little more umph in the firepower.

	If you send me mail telling me you like it, i'll keep distributing it,
and it will get better and have more features.  If you send me flame mail, 
then i'll print it and put it on my wall at work.

	What follows is a diff of my source tree and my master source tree.   


--CUT HERE--
diff -uNr master/Makefile geeklib-0.1/Makefile
--- master/Makefile	Fri Jan 16 01:31:24 1998
+++ geeklib-0.1/Makefile	Fri Jan 16 01:31:01 1998
@@ -15,7 +15,7 @@
 
 ######################################################
 
-CFLAGS=-fPIC -O2
+CFLAGS=-fPIC -O2 -funroll-loops -fomit-frame-pointer
 
 OBJS= g_ai.o g_cmds.o g_combat.o g_func.o g_items.o g_main.o \
 g_misc.o g_monster.o g_phys.o g_save.o g_spawn.o g_target.o \
diff -uNr master/g_local.h geeklib-0.1/g_local.h
--- master/g_local.h	Fri Jan 16 01:31:24 1998
+++ geeklib-0.1/g_local.h	Fri Jan 16 01:31:01 1998
@@ -462,6 +462,33 @@
 extern	cvar_t	*sv_cheats;
 extern	cvar_t	*maxclients;
 
+/* MOD */
+
+extern	cvar_t	*blaster_d;
+
+extern	cvar_t	*shotgun_d;
+
+extern	cvar_t	*machine_d;
+
+extern	cvar_t	*chain_d;
+
+extern	cvar_t	*grenade_d;
+extern	cvar_t	*grenade_dr;
+extern	cvar_t	*grenade_rd;
+
+extern	cvar_t	*rocket_d;
+extern	cvar_t	*rocket_dr;
+extern	cvar_t	*rocket_rd;
+
+extern	cvar_t	*hyperb_d;
+
+extern	cvar_t	*rail_d;
+
+extern	cvar_t	*bfg_d;
+extern	cvar_t	*bfg_dr;
+extern	cvar_t	*bfg_rd;
+
+/* END */
 
 #define world	(&g_edicts[0])
 
diff -uNr master/g_main.c geeklib-0.1/g_main.c
--- master/g_main.c	Fri Jan 16 01:31:24 1998
+++ geeklib-0.1/g_main.c	Fri Jan 16 01:31:01 1998
@@ -44,6 +44,35 @@
 
 cvar_t	*sv_cheats;
 
+/* MOD */
+
+cvar_t	*blaster_d;
+
+cvar_t	*shotgun_d;
+
+cvar_t	*machine_d;
+
+cvar_t	*chain_d;
+
+cvar_t	*grenade_d;
+cvar_t	*grenade_dr;
+cvar_t	*grenade_rd;
+
+cvar_t	*rocket_d;
+cvar_t	*rocket_dr;
+cvar_t	*rocket_rd;
+
+cvar_t	*hyperb_d;
+
+cvar_t	*rail_d;
+
+cvar_t	*bfg_d;
+cvar_t	*bfg_dr;
+cvar_t	*bfg_rd;
+
+/* END */
+
+
 void SpawnEntities (char *mapname, char *entities, char *spawnpoint);
 void ClientThink (edict_t *ent, usercmd_t *cmd);
 qboolean ClientConnect (edict_t *ent, char *userinfo, qboolean loadgame);
diff -uNr master/g_save.c geeklib-0.1/g_save.c
--- master/g_save.c	Fri Jan 16 01:31:24 1998
+++ geeklib-0.1/g_save.c	Fri Jan 16 01:31:01 1998
@@ -162,6 +162,28 @@
 	bob_pitch = gi.cvar ("bob_pitch", "0.002", 0);
 	bob_roll = gi.cvar ("bob_roll", "0.002", 0);
 
+/* MOD */
+
+	blaster_d = gi.cvar("blaster_d", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	shotgun_d = gi.cvar("shotgun_d", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	machine_d = gi.cvar("machine_d", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	chain_d = gi.cvar("chain_d", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	grenade_d = gi.cvar("grenade_d", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	grenade_dr = gi.cvar("grenade_dr", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	grenade_rd = gi.cvar("grenade_rd", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	rocket_d = gi.cvar("rocket_d", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	rocket_dr = gi.cvar("rocket_dr", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	rocket_rd = gi.cvar("rocket_rd", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	hyperb_d = gi.cvar("hyperb_d", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	rail_d = gi.cvar("rail_d", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	bfg_d = gi.cvar("bfg_d", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	bfg_dr = gi.cvar("bfg_dr", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+	bfg_rd = gi.cvar("bfg_rd", "0", CVAR_SERVERINFO|CVAR_USERINFO|CVAR_ARCHIVE);
+
+
+/* END */
+
+
 	// items
 	InitItems ();
 
diff -uNr master/p_weapon.c geeklib-0.1/p_weapon.c
--- master/p_weapon.c	Fri Jan 16 01:31:24 1998
+++ geeklib-0.1/p_weapon.c	Fri Jan 16 01:31:02 1998
@@ -636,9 +636,30 @@
 	float	damage_radius;
 	int		radius_damage;
 
+/*
 	damage = 100 + (int)(random() * 20.0);
 	radius_damage = 120;
 	damage_radius = 120;
+*/
+
+	if (rocket_d->value > 0) {
+		damage = rocket_d->value;
+	} else {
+		damage = 100;
+	}
+
+	if (rocket_rd->value > 0) {
+		radius_damage = rocket_rd->value;
+	} else {
+		radius_damage = 120;
+	}
+
+	if (rocket_dr->value > 0) {
+		damage_radius = rocket_dr->value;
+	} else {
+		damage_radius = 120;
+	}
+
 	if (is_quad)
 	{
 		damage *= 4;
@@ -690,6 +711,10 @@
 	vec3_t	start;
 	vec3_t	offset;
 
+	if (blaster_d->value > 0) {
+		damage = blaster_d->value;
+	}
+
 	if (is_quad)
 		damage *= 4;
 	AngleVectors (ent->client->v_angle, forward, right, NULL);
@@ -813,6 +838,12 @@
 	int			kick = 2;
 	vec3_t		offset;
 
+	if (machine_d->value > 0) {
+		damage = machine_d->value;
+	} else {
+		damage = 8;
+	}
+
 	if (!(ent->client->buttons & BUTTON_ATTACK))
 	{
 		ent->client->machinegun_shots = 0;
@@ -894,12 +925,28 @@
 	vec3_t		offset;
 	int			damage;
 	int			kick = 2;
-
+/*
 	if (deathmatch->value)
 		damage = 6;
 	else
 		damage = 8;
 
+*/
+	if (deathmatch->value) {
+		if (chain_d->value > 0) {
+			damage = chain_d->value;
+		} else {
+			damage = 6;
+		}
+	} else {
+		if (chain_d->value > 0) {
+			damage = chain_d->value;
+		} else {
+			damage = 8;
+		}
+	}
+
+
 	if (ent->client->ps.gunframe == 5)
 		gi.sound(ent, CHAN_AUTO, gi.soundindex("weapons/chngnu1a.wav"), 1, ATTN_IDLE, 0);
 
@@ -1014,9 +1061,15 @@
 	vec3_t		start;
 	vec3_t		forward, right;
 	vec3_t		offset;
-	int			damage = 4;
+	int			damage;
 	int			kick = 8;
 
+	if (shotgun_d->value > 0) {
+		damage = shotgun_d->value;
+	} else {
+		damage = 8;
+	}
+
 	if (ent->client->ps.gunframe == 9)
 	{
 		ent->client->ps.gunframe++;
@@ -1132,7 +1185,7 @@
 	vec3_t		offset;
 	int			damage;
 	int			kick;
-
+/*
 	if (deathmatch->value)
 	{	// normal damage is too extreme in dm
 		damage = 100;
@@ -1143,6 +1196,25 @@
 		damage = 150;
 		kick = 250;
 	}
+*/
+
+	if (deathmatch->value) {
+		if (rail_d->value > 0) {
+			damage = rail_d->value;
+			kick = 200;
+		} else {
+			damage = 100;
+			kick = 200;
+		}
+	} else {
+		if (rail_d->value > 0) {
+			damage = rail_d->value;
+			kick = 250;
+		} else {
+			damage = 150;
+			kick = 250;
+		}
+	}
 
 	if (is_quad)
 	{
@@ -1193,8 +1265,21 @@
 {
 	vec3_t	offset, start;
 	vec3_t	forward, right;
-	int		damage = 500;
-	float	damage_radius = 1000;
+	int		damage;
+	float	damage_radius;
+
+	if (bfg_d->value > 0) {
+		damage = bfg_d->value;
+	} else {
+		damage = 500;
+	}
+
+	if (bfg_dr->value > 0) {
+		damage_radius = bfg_dr->value;
+	} else {
+		damage_radius = 1000;
+	}
+
 
 	if (ent->client->ps.gunframe == 9)
 	{
