=====================================================================================
= Quake bug fixes by Carl Lloyd-Parker (Lord Smagol) Carl.Lloyd-Parker@bigfoot.com =
=====================================================================================

Having completed Quake (and Mission Packs #1 and #2) on Nightmare skill,
I became irritated that I couldn't find some monsters.
After digging around, I discovered that this was due to several bugs.

These bug-fixes are as a .PAT file so you can build the .QC (v106) sources.

	Get Patch    from ftp://cdrom.com/pub/quake/utils/quakec/dif_pat.zip
	Get Sources  from ftp://cdrom.com/pub/quake/quakec/utils/qc106pac.zip
	Get Compiler from ftp://cdrom.com/pub/idgames/idstuff/source or

If you aren't into Quake-C, and want a PROGS.DAT with the fixes, I have also written a Deathmatch battle server with lots of extras (which includes these fixes):

	ftp://cdrom.com/pub/idgames2/quakec/misc/battler.zip

=====================================================================================

These are the bugs fixed:

ROTFISH COUNTED TWICE
---------------------

In MONSTERS.QC the function swimmonster_start_go has the statement:

	total_monsters = (total_monsters + 1);

This has been removed, since it is in swimmonster_start, which calls swimmonster_start_go


KILLING SHUB-NIGGURATH NOT COUNTED AS A KILL
--------------------------------------------

Killing Shub-Niggurath does not register as a killed monster.

In OLDONE.QC the function finale_4 has the line:

	sound (self, CHAN_VOICE, "boss2/pop2.wav", 1, ATTN_NORM);

I added these lines just after it:

	killed_monsters = killed_monsters + 1;
	WriteByte (MSG_ALL, SVC_KILLEDMONSTER);


MONSTERS APPEARING AS STATUES
-----------------------------

If you are a real Quake addict, and have tried making Nightmare Speed Demos, you have probably come across a monster that is just a statue!

In MONSTERS.QC there are several instances of the line:

	self.nextthink = self.nextthink + random()*0.5;

The monster statues occur when random() returns zero, leaving self.nextthink zero, so the ***monster_start_go routine that sets the monsters as 'alive' doesn't get called.

I changed these lines to:

	self.nextthink = time + random()*0.5;

I have checked, and found that time starts at 0:01 rather than 0:00 - so the original lines, which were supposed to spread the think times, didn't, but my ones do :)


JUST A MINOR TYPO
-----------------

In MISC.QC the function misc_fireball has a minor typo:

	if (!self.speed)
		self.speed == 1000;

Changed to:

	if (!self.speed)
		self.speed = 1000;


TELEPORTING ONTO AN INVINCIBLE PLAYER
-------------------------------------

This was clearly intended to frag the player teleporting in.

In TRIGGERS.QC the function tdeath_touch has the statement:

	if (other.invincible_finished > time)
		self.classname = "teledeath2";

Changed to:

	if (other.invincible_finished > time)
	{
		self.classname = "teledeath2";
		T_Damage (self.owner, self, self, 50000);
	}


PLAYER KILLS SOMETIMES REPORTED INCORRECTLY
-------------------------------------------

If you fire the Nailgun, Supernailgun, Grenade Launcher or Rocket Launcher, change to another weapon before the original shot kills another player, your kill was reported as a kill with the current weapon!

This patch is too spread-out to detail here; Look for "/// Killing Weapon" in CLIENT.QC and WEAPONS.QC if you need to.


DISCHARGING INTO THE WATER/SLIME/LAVA
-------------------------------------

Not really a bug - I just felt like cleaning it up :)

In CLIENT.QC the function ClientObituary has the code:

	if (targ.weapon == IT_LIGHTNING && targ.waterlevel > 1)
	{
		bprint (" discharges into the water.\n");
		return;
	}

Changed to:

	if (targ.weapon == IT_LIGHTNING && targ.waterlevel > 1)
	{
		if (targ.watertype == CONTENT_LAVA)
		{
			bprint (" discharges into the lava.\n");
			return;
		}
		if (targ.watertype == CONTENT_SLIME)
		{
			bprint (" discharges into the slime.\n");
			return;
		}
		bprint (" discharges into the water.\n");
		return;
	}


START: INTRODUCTION - TELEPORT ERROR
------------------------------------

(MAPS/START.BSP in PAK0.PAK)

I was playing on START once, with a missile teleport option active, and I Gibbed a Zombie near the entrance to Shub's pit, and one of the Gibs dropped down the shaft and caused a teleport fault.

There is a trigger_teleport with "target" "t11" and an "info_null" with "targetname" "t11" in the shaft.

Change the trigger_teleport to "target" "t8" (clear the character after the quote with a space).

This will make the teleport destination be above the Red Armor.


================================================
= FOR THOSE OF YOU WHO LIKE TO KILL EVERYTHING =
================================================

E2M4: THE EBON FORTRESS - MISSING 4 SCRAGS
------------------------------------------

(MAPS/E2M4.BSP in PAK1.PAK)

There is a trigger_relay:

	"origin" "216 2760 200"
	"targetname" "t66"

It should have:

	"targetname" "t68"


E4M3: THE ELDER GOD SHRINE - MISSING 1 FIEND
--------------------------------------------

(MAPS/E4M3.BSP in PAK1.PAK)

There is a trigger_teleport:

	"target" "t189"
	"spawnflags" "258"

This should have:

	"spawnflags" "2"

Put 2 spaces after the "2" to clear the old characters.


MISSION PACK #1 (HIPNOTIC) HIP2M4: THE CRYPT - MISSING 2 SPIKEMINES
-------------------------------------------------------------------

(MAPS/HIP2M4 in Hipnotic PAK0.PAK)

There are 2 SpikeMines that are too close to the walls, and don't appear:

	"origin" "208 1472 272"
and
	"origin" "496 1040 272"

Move them slightly to:

	"origin" "208 1440 272"
and
	"origin" "464 1040 272"


MISSION PACK #1 (HIPNOTIC) HIP2M5: MORTUM'S KEEP - MISSING 3 SPIKEMINES
-----------------------------------------------------------------------

(MAPS/HIP2M5 in Hipnotic PAK0.PAK)

There are 3 func_spawn spike_mine with non-existent triggers - Looks like a typo ;)

	"targetname" "4500"

Change them to:

	"targetname" "3400"

This makes them appear when the Secret area above the entrance arch is triggered.


MISSION PACK #2 (ROGUE) R1M6: TEMPLE OF PAIN - MISSING 1 WRATH
--------------------------------------------------------------

(MAPS/R1M6 in Rogue PAK0.PAK)

There is a trigger_teleport that is too low to touch the monster_wrath that it should:

	"origin" "-2526 -2186 176"

Move it to:

	"origin" "-2558 -2186 240"


=====================================================================================

Credits go to:

	id Software for Quake.

	John Carmack for releasing QuakeC; allowing great flexibility.

	Thresh for helping John Carmack make some space in his garage ;)

=====================================================================================
=                   "Intel giveth ... and Microsoft taketh away"                    =
=====================================================================================
