Title    : Chase cam, v4.0
Filename : chasecam.zip
Version  : 4.0
Date     : 8 Dec 96
Author   : Rob Albin
Email    : albinatr@apci.net
Web site : http://www.apci.net/~albinatr
Credits  : Ferrara Francesco and Olivier
           Montanuy for bringing us QuakeC Manual v1.0,
           Vhold <vhold@netwizards.net> for his Homing Missiles
           v.001 QC patch, for the good velocity changing examples.
           Jeff Epler (jepler@inetnebr.com) for Flashlight v2
           for the code to the laser-targeter.

Type of Mod
-----------
 Quake C  : yes
 Sound    : no
 MDL      : no


Format of QuakeC
----------------
 unified diff  : yes, (QC ver 1.06)
 context diff  : no
 .qc files     : no
 progs.dat     : yes, (ver 1.06)

(If you don't have patch and diff and can't work with .PAT files,
check out my Quake-c page listed at the bottom of this file.)

Description of the Modification
-------------------------------

 impulse 30   View-point toggle
              (Chase view, Normal view)
 impulse 31   Laser-targeter toggle
              (Standard, Glowing, off)

 impulse 200  multiskin impulse up
 impulse 201  multiskin impulse down

 Multiskin v1.1
 -The server code for Multiskin v1.1 by Dennis Noordsij is built in,
  the player.mdl is not included, but if you have the player.mdl,
  you can add it to this game as described in Multiskin.

 Auto switching
 -Chase view temporarily auto disables while in water.  Quake does
  not like to track the view between water surfaces.  So the chase
  view avoids it like the plague :)

 Multi Player
 -Chase eyes are visible behind a player when in chase view.
  Haven't run any tests yet, but I've heard it works fine for MP.

 Single Player
 -In single player only, your current settings for the targeter and
  view are saved between levels. (ver40: Also saves HUD state)
  (Only saves when switching levels, not if you die and restart -
  they'll auto-switch to what they were when you first entered)

  ****
  Thanks to:
   David Weiden
   Eric Fisher
   pLaGuE, http://lonestar.texas.net/~plague/
   Steve Nadeau
   Giles Gregg
   Alan Dabiri
  For many good ideas and the positive feedback.
  ****
 
----------------
 IMPULSE SUMMARY
----------------
  (from weapons.qc)
	// ### chase cam mods ###
	else if (self.impulse == 30) Toggle_chase_cam();
	else if (self.impulse == 31) LaserTargeterToggle( self );
	else if (self.impulse == 34) Chase_cam_change_dist(0); // minus
	else if (self.impulse == 35) Chase_cam_change_dist(1); // plus
	else if (self.impulse == 36) Chasecam_find_monster(0); // minus
	else if (self.impulse == 37) Chasecam_find_monster(1); // plus

	// ### hot key weapon mod ###
	else if (self.impulse == 40) HotKey_previous_weapon();
	else if (self.impulse == 41) HotKey_weapon(1); // axe
	else if (self.impulse == 42) HotKey_weapon(2); // grenade
	else if (self.impulse == 43) HotKey_weapon(3); // rocket
	else if (self.impulse == 44) HotKey_CycleWeaponCommand();
	else if (self.impulse == 45) HotKey_CycleWeaponReverseCommand();

	// ### HUD mod ###
	else if (self.impulse == 50) Spawn_HUD_entity(self);

	// ### Multiskin v1.1 ###
	else if (self.impulse == 200) Choose_multiskin(0); // up
	else if (self.impulse == 201) Choose_multiskin(1); // down


 [ver 4.0 updates]
 -TRACKING nailed!!! :-)
   -no more vertical offset variable (still held over for spy tracking
    function), adjusts based on distance to player.
   -Reworked down aiming adjustments, pulls forward and down
    with a smoother grade.
  A 3rd person view will never be as efficient as a 1st person view
  in a fight, but IMO, this ver. is pretty close :-)

 -Variable player jumping height
  Aiming all the way down to eye level has no effect, and jumps with
  default velocity.  Aiming up increases the height based on how high
  your looking when you jump.

 -HUD (impulse 50)
  This is a hack of course, since there's no way in QC to do a real
  HUD.  Only enabled in SP, since it takes over the message area and
  turns it into a static display.  Refreshes every 2.5 seconds to keep
  on screen, or immediately on a number change.
  (Displays current weapon abbreviations in chase views.)

 [ver 3.6 updates]
  (all updates to spy view)
 -Fixed player not being able to take damage while in spy view.
 -View angles line up properly when shifting between different targets
  and back to player view.
 -Being able to fire your guns in spy view fixed from version 3.5.
  (I forgot to un-rem the lines in W_Attack() after some debugging.)

 [ver 3.5 updates]
 -Fixed the view switching for the spy view.  Instead of switching
  back and forth from the player it cycles straight through targets.
  Since the forward/back impulses don't switch back, the toggle for
  the chasecam (impulse 30) will disable either view.

----------------
 HOT-KEY WEAPONS
----------------

  Provides hot-key impulses for axe, grenade, and rocket launcher
  that return to previous weapon.

  New cycle weapons impulses that don't select these weapons.

  (NOTE:  if you don't use the new impulses, the original weapons'
   behavior is unchanged.  An optional thing.)  

  IMPULSE LIST (from weapons.qc)
  impulse 40 HotKey_previous_weapon();
  impulse 41 HotKey_weapon(1); // axe
  impulse 42 HotKey_weapon(2); // grenade
  impulse 43 HotKey_weapon(3); // rocket
  impulse 44 HotKey_CycleWeaponCommand();
  impulse 45 HotKey_CycleWeaponReverseCommand();

  CFG file use:

   alias +axe_hotkey "impulse 41; +attack"
   alias -axe_hotkey "impulse 40; -attack"

   alias +grenade_hotkey "impulse 42; +attack"
   alias -grenade_hotkey "impulse 40; -attack"

   alias +rocket_hotkey "impulse 43; +attack"
   alias -rocket_hotkey "impulse 40; -attack"

   bind "<key>" "+axe_hotkey"
   bind "<key>" "+grenade_hotkey"
   bind "<key>" "+rocket_hotkey"

   // new weapons cycle commands (skips hot-key weapons)
   bind "<key>" "impulse 44"
   bind "<key>" "impulse 45"

------------------
 CHASE VIEW SPYING
------------------
  [credits to Defiance (defienc@ibm.net) for the suggestion
   on this one]

  (impulse 30  chasecam toggle, to switch out of spy view)
  impulse 36   Last monster/player
  impulse 37   Next monster/player

  In single player, cycles through living monsters on level.
  In DM or coop, cycles through other living players on level.
  Email me if you find any problems with the DM stuff.

  DM note:
  When hit in spy view, you take the damage and flip back to
  normal view.  The damage is accurate, but will never drop
  your health below 1.  (Dying in the middle of transition to
  normal view tested out as buggy.)
  
-----------------------------
 CHASE VIEW DISTANCE CHANGING
-----------------------------

  impulse 34    lower distance
  impulse 35    increase distance

  chasecam.qc file line to change for permanently modifying
  default distance and offset (near top of file, this will only
  work if you have the 1.06 QC source code and compile your own
  progs.dat from the included source files.):

    // defaults reset every time level starts
    // (ver40: chasecam_zofs has no effect on player tracking view)
    float chasecam_dist = 118, chasecam_zofs = 24;

How to Install the Modification
-------------------------------
 Make a sub-directory in quake called 'chasecam' and copy the new
 PROGS.DAT to it.

 Copy autoexec.cfg, config.cfg, and quake.rc from 'id1' into 'chasecam'
 if they exist.
 add:
   bind "<key>" "impulse 30"
   bind "<key>" "impulse 31"
   bind "<key>" "impulse 200"
   bind "<key>" "impulse 201"
 to autoexec.cfg
 From directory 'quake' type:
   quake -game chasecam


 **************************************
 *            NEED TO READ            *
 **************************************
 Known Bugs:
  In certain spots walls will dissappear when view is up against
  them, rare.  (Testing location: starting hall e3m7)

  Under testing every once in a while it still can disable
  the fire key from restarting the level if you die.  Usually
  if your view gets hung up when you swing your view around
  crazy-like after your dead (like for testing :)

  *** Type 'restart' at the console if this happens ***

  Very rare, when it happens your carcass comes back to life
  standing up.  Time to bring down the console.

Copyright and Distribution Permissions
--------------------------------------

 Authors MAY use these modifications as a basis for other
 publically available work.

 You may distribute this Quake modification in any electronic
 format as long as this description file remains intact and unmodified
 and is retained along with all of the files in the archive and no fees
 other than the costs of distribution are charged.

Availability
------------
http://www.apci.net/~albinatr/quake-c
Online services:
 MSN Computer Games File Lib
FTP:
 ftp://cdrom.com/pub/quake/quakec/misc/
