MultiWeapon - Copyright 1997 Wes Morrison
Original v1.06 Quake C code Copyright id Software

How to use MultiWeapon source code

Only new files and files that have changed are included.

To create a brand new patch based on version 1.06 QuakeC code, create a
directory with the standard 1.06 files, then copy the files in this
directory over them.

To add MultiWeapon to an existing patch, add the file MultiWep.QH to
PROGS.SRC after DEFS.QC, and add MultiWep.QC to the end of PROGS.SRC. Add
calls to MultiWeapon routines to the following routines:

In WORLD.QC, routine worldspawn:

        precache_model ("progs/v_light.mdl");

        // MultiWeapon precaches and modelindexes set.
        MultiWeapon_PreCache (); 

//
// Setup light animation tables. 'a' is total darkness, 'z' is maxbright.
//


In CLIENT.QC, routine PutClientInServer:

	modelindex_player = self.modelindex;

	// MultiWeapon patch
	set_player_modelindexes ();

	setsize (self, VEC_HULL_MIN, VEC_HULL_MAX);

In CLIENT.QC, routine CheckPowerups:

	else
		//self.modelindex = modelindex_player;	// don't use eyes
		self.modelindex = self.modelindex_thisplayer; // MultiWeapon patch; replaces above line

// invincibility

In WEAPONS.QC, routine W_SetCurrentAmmo:

	else
	{
		self.currentammo = 0;
		self.weaponmodel = "";
		self.weaponframe = 0;
	}

	// MultiWeapon patch
	set_player_weapon ();
};

In PLAYER.QC, routine set_suicide_frame:

{	// used by kill command and diconnect command
	
	// MultiWeapon patch - since several player models are used,
	// check health instead of model. Otherwise, when a non-dead
	// client disconnects, a "fraggable" model remains behind.

	//if (self.model != "progs/player.mdl") // original id code
	if (self.health < -40)					// MultiWeapon replacement
		return;	// allready gibbed

	// Now set the default player model, because another model is probably
	// being used right now.
	self.modelindex = modelindex_player;

	self.frame = $deatha11;

That's it!
