================================================================
Title         : Quake engine source fixes
Date          : 2000-08-20
Filename      : srcfixes20000820.zip
Author        : Matthias "Maddes" Buecher
Email Address : maddes@bigfoot.com
Homepage      : Quake Info Pool
                http://www.bigfoot.com/~maddes (redirection)
                Quake Standards Group
                http://www.quakesrc.org/

Description   : Update with bugfixes for the offically
                released Quake sourcecode.
                All included code is published under the GPL.
                Read GNU.TXT for more information.
================================================================

Just extract to your Quake source directory and recompile.
Check out the history log, as there are some fixes which are not included as files, e.g. typos.
To use colored lightning in GLQuake with GL_FLASHBLEND 0 you have to enable RGBA
colormaps with the parameter -lm_4

To find the changes just search for the authors name, e.g. Maddes, Radix, Neal, etc.
All changes will be documented as tutorials on the Quake Standards Group page soon.

Don't assume the changes and fixes to be perfect, if you see any problems please mail me.

If you have problems compiling the sourecode check out the included QSML FAQ.

Thanks
Maddes


Hints/Problems/Questions:
-------------------------
* Gfx bug in GLQuake on start map with fov 20, does not happen with GLQuakeWorld
* Debug version of WinQuake says "Protectection change failed"
  (hint of starting windowed by Radix didn't helped me)
* Use Quake functions instead of compiler functions? If so why?
  e.g. strlen, strcpy, memcpy, memset, etc.
* Nvidia detonator drivers 3.68+ (5.13 is recommended by Maddes, 5.32/6.01 is current latest)
  - You have to enable multitexture again, e.g. for glowmaps, with
    "ForceMultiTexture"=dword:00000001 for OpenGL again, as the registry
    settings moved to HKLM\System\CurrentControlSet\Services\Class\Display\nnnn
  - Console transparency does not work until 5.13
  - Switching back and forth from GLQuake to desktop causes an incorrectly
    GLQuake display, if GLQuake has not the same resolution than the desktop
  - 5.x drivers flicker on start of GLQuake, but this vanishes after ~1 minute
    (set OpenGL buffer flipping to "Use Block Transfer")
  - 5.14/5.16 drivers: general protection fault in DDHELP (NVDD32.DLL) when
    starting WinQuake,  second start works well, the third not, the fourth
    works, the fifth not and so on. (assumption: forgotten(?) debugging code?)


Credits:
--------
Ender <ender@telefragged.com> - http://qsg.telefragged.com/
FrikaC <frikac@telefragged.com> - http://qsg.telefragged.com/ or http://www.mdqnet.net/
Kryten <kryten@inside3d.com> - http://www.inside3d.com/
Radix <radix@planetquake.com> - http://www.planetquake.com/
TcT <quake@tc84.de> - http://tc84.de/quake/
Neal White <NealW@softblox.com> - http://home.telefragged.com/wally/
Fett <erich@heintz.com>
Rich Whitehouse <thefatal@telefragged.com> - http://www.telefragged.com/thefatal/
SaRcaZm <epca@powerup.com.au>
Raymond Martineau <dynamo_tamarin@yahoo.com>
Nathan Cline <skynxnex_@hotmail.com>
Hendrik Lipka <???>
Norberto Alfredo Bensa <nbensa@hotmail.com>


**********************
* ToDo / Coming Soon *
**********************

All further updates will be done to the QuakeForge CVS tree at http://www.quakeforge.net/
If you want to join the QuakeForge project but don't know how to setup WinCVS 
then check the textfile at http://www.inside3d.com/qip/text/wincvs.txt


***********
* History *
***********

2000-08-04:
===========
#1 Transparent console for software renderer by Norberto Alfredo Bensa/Maddes
quake/console.c
quake/draw.c
quake/screen.c
quake/gl_draw.c (removed "con_alpha" cvar definition/registration, no more GL-only)

#2 Corrected ugly typo in "2000-01-02 +USE unbound fix"
quake/cl_input.c ("in_jump" -> "in_use" *doh*)


2000-07-30:
-----------
#1 DJGPP compiler warning fix by Norberto Alfredo Bensa
quake/quakedef.h
quake/common.c
quake/draw.c
quake/host_cmd.c
quake/sbar.c
quake/snd_dma.c
quake/d_parta.s
quake/d_polysa.s
quake/math.s
quake/gas2masm/gas2masm.c (Indirect jmp fix taken from the QuakeForge project)
quakeworld/gas2masm/gas2masm.c (Indirect jmp fix taken from the QuakeForge project)

#2 QCExec by FrikaC/Maddes
The ED_FindFunction had to be typecasted as it was not declared *doh*
Corrected through DJGPP compiler warning fix by Norberto Alfredo Bensa
quake/quakedef.h

#3 Tied up DJGPP makefile for DOSQuake by Norberto Alfredo Bensa
Removed unnecessary stuff, added dependency check, etc.
makefile.dosquake -> makefile.djgpp

#4 Removed unneccessary line from "1999-12-23 SV_MAXVELOCITY fix"
winquake/sv_phys.c


2000-07-28:
-----------
#1 DOSQuake input init before video init fix by Norberto Alfredo Bensa
quake/host.c

#2 DOSQuake time running too fast fix by Norberto Alfredo Bensa
Warning!!! This is a non ANSI C fix, which currently only works with DJGPP
quake/sys_dos.c


2000-07-16:
-----------
#1 Tied up the directory structure and files
All unneccessary files have been removed and moved non-code files to subdirs
winquake dir -> quake dir
qw dir -> quakeworld dir

#2 DOSQuake/DJGPP mem detection fix by Norberto Alfredo Bensa
quake/sys_dos.c

#3 DOSQuake wrong variable definition fix by Ender/Norberto Alfredo Bensa
quake/sys_dos.c

#4 DOSQuake makefile for DJGPP by Norberto Alfredo Bensa
usage: make -f makefile.dosquake
quake/makefile.dosquake

#5 Loadgame initialization fix by Norberto Alfredo Bensa
quake/host_cmd.c

#6 General variable definition for GLQuake-only variable fix
quake/cl_parse.c

#7 VC++ project fixes
When compiling release versions of Quake then the release version of GAS2MASM is used
Only one occurrence of the DXSDK and the SCITECH directory is present and used
quake/winquake.dsp
quakeworld/client/qwcl.dsp
quakeworld/server/qwsv.dsp


2000-07-11:
-----------
#1 Piped output of a dedicated server not written immediately fix by Hendrik Lipka
winquake/sys_dos.c
winquake/sys_linux.c
winquake/sys_win.c
qw/client/sys_linux.c


2000-07-09:
-----------
#1 GPF when GUS or BLASTER variable not set fix by Maddes/Raymond Martineau
winquake/snd_dma.c

#2 Sound rate not displayed in QW fix
winquake/snd_dma.c

#3 Dedicated server bug in GLQuake fix by Nathan Cline
winquake/gl_draw.c
winquake/gl_model.c


2000-05-02:
-----------
#1 QSG Versioning Part III (SVC Versioning)
qsg_3_versioning_svc.txt
winquake/host.c
winquake/pr_cmds.c
winquake/qsg.c
winquake/qsg.h
winquake/qsg_data.c
winquake/server.h
winquake/sv_main.c
progs/defs.qc

#2 Added fix for levels being fullbright with RGBA lightmaps by SaRcaZm
winquake/gl_rsurf.c

#3 White effect fix by QSG
winquake/gl_rsurf.c

#4 Added SVC versioning example codes + colored dynamic lights by SaRcaZm (needs parameter -lm_4)
winquake/cl_parse.c
winquake/cl_tent.c (SaRcaZm)
winquake/client.h (SaRcaZm)
winquake/gl_rlight.c (SaRcaZm)
winquake/gl_rsurf.c (SaRcaZm)
winquake/host_cmd.c
winquake/qsg_data.c
winquake/sv_main.c
progs/ogre.qc
progs/shalrath.qc
progs/weapons.qc


2000-05-01:
-----------
#1 QSG Versioning Part II (CLC Versioning)
qsg_2_versioning_clc.txt

#2 Added example code for precise aiming (clc_move)
winquake/cl_input.c
winquake/sv_user.c


2000-04-30:
-----------
#1 QSG Versioning Part I (General And Handshake System)
qsg_1_handshake.txt
winquake/cl_demo.c
winquake/cl_main.c
winquake/cl_parse.c
winquake/host.c
winquake/host_cmd.c
winquake/protocol.h
winquake/qsg.c
winquake/qsg.h
winquake/quakedef.h
winquake/server.h
winquake/sv_main.c
winquake/sv_phys.c
winquake/sv_user.c
progs/defs.qc
progs/world.qc


2000-01-31:
-----------
#1 Minor enhanced QCExec command for dedicated servers
winquake/host_cmd.c

#2 Added contact cvar for version command
winquake/host.c
winquake/host_cmd.c

#3 Compressed display of cvar like in Quake 2/3 with flags
   A = Archive, stored in config.cfg
   R = Read-Only
   S = Server, changes broadcasted to clients
winquake/cvar.c

#4 Valid result correction
winquake/in_win.c
winquake/vid_win.c

#5 typos (now included as files, just do a replace over all source files => *.c,*.h,*.s,*.asm,*.qc)
allways -> always
allready -> already (from 1999-12-24)

#6 Some lines were in Unix format
winquake/anorm_dots.h
winquake/gl_rlight.c


2000-01-20:
-----------
#1 Updated the Endframe functionality with suggestions from FrikaC of the QSG, it's now like startframe
winquake/sv_phys.c

#2 Console typing enhancement by Radix/Maddes (QSG tutorial)
winquake/console.c
winquake/keys.c

#3 Console scrolling fix (increased console buffer to 64K = ~6 pages in 1024x768)
winquake/console.c
winquake/console.h
winquake/keys.c

#4 Border with viewsize 100 fix by Radix
winquake/rmain.c

#5 Missing linefeeds
winquake/cl_parse.c
winquake/sv_main.c

#6 CvarList and CmdList (increased config buffer to 32K)
winquake/cmd.c
winquake/cmd.h
winquake/cvar.c
winquake/cvar.h

#7 QC Exec by FrikaC/Maddes (QSG tutorial)
winquake/sv_user.c
winquake/host_cmd.c
winquake/quakedef.h

#8 ChaseCam fix by FrikaC (QSG tutorial)
winquake/chase.c
winquake/gl_rmain.c
winquake/r_main.c

#9 Set default maximum clients to 16 instead of 4
winquake/host.c
winquake/menu.c

#10 Transparent console in GLQuake by Radix (cvar "con_alpha": 0-1) (QSG tutorial)
winquake/gl_draw.c

#11 Variable console height by Fett/Maddes (cvar "scr_conheight": 0-1) (QSG tutorial)
Enhanced, so that it works perfectly with transparent console
winquake/gl_draw.c
winquake/gl_screen.c
winquake/menu.c
winquake/screen.c
winquake/screen.h

#12 Enhanced cvar handling
Better performance, less zone usage, optional read-only and range check for new values
cvar_t's 5th field for enabling read-only, 6th for range check (1=float, 2=int, 3=boolean), 6th and 7th for min and max values
winquake/cvar.c
winquake/cvar.h

#13 Range check added for some cvars
con_alpha: 0-1
scr_conheight: 0-1

#14 Maximum precision for FTOS
winquake/pr_cmds.c

#15 OpenGL fullbright fix by Neal White III (cvar "gl_glowmap": 0/1, changes take effect on next map)
Currently only works with multitexture enabled
winquake/gl_model.c
winquake/gl_model.h
winquake/gl_rmisc.c
winquake/gl_rsurf.c
winquake/glquake.h

#16 Added cvar "scorelimit" for team addons
winquake/host.c

#17 Enhanced "version" command
Can now be called from client via "cmd version"
winquake/host_cmd.c
winquake/sv_user.c


2000-01-02: (B)
-----------
Changed the Endframe function and removed the QCVERSION from the GLOBALS
if you already downloaded the first package, please do the following:
winquake/progdefs.q1 replace with original
winquake/progs/defs.qc delete


2000-01-02:
-----------
#1 changed "#8 multiple "-game" parameters" of 1999-12-23
Reverted back to only one "-game" parameter and added support for multiple
"-data" parameters, to avoid misunderstandings that multiple PROGS.DAT can
work together and to have a better solution for implementing in QuakeWorld.
winquake/common.c

#2 Missing R_WATERWARP in OpenGL fix by Radix (QSG tutorial)
winquake/gl_rmain.c
winquake/gl_rmisc.c
winquake/gl_rsurf.c

#3 +USE unbound fix
Info: Added parameter "-nouse" to disable setting .button1 accordingly for old
      PROGS.DAT which store data in the client's .button1
winquake/cl_input.c
winquake/common.c
winquake/quakedef.h
winquake/sv_user.c

#4 Adding EndFrame function
winquake/pr_edict.c
winquake/progs.h
winquake/sv_phys.c
winquake/progs/world.qc (example QuakeC code)

#5 Compatibility check
Info: This is a test for implementing new global vars without breaking
      compatibility for older PROGS.DAT. These vars should be defined by the
      Quake Standards Group.
winquake/pr_edict.c
winquake/quakedef.h


1999-12-27:
-----------
#1 Conwidth/height charset fix by TcT
qw/client/gl_draw.c

#2 Invalid skin number as developer message
winquake/gl_rmisc.c

#3 QW Server changes (timelimit, fraglimit, etc.) are not broadcasted to clients
qw/client/cvar.c

#4 ATOF problems with leading spaces fix
winquake/common.c
qw/client/common.c


1999-12-26:
-----------
#1 Adpated previous fixes to QW
   a) Weird cvar zeros fix
   qw/client/cvar.c
   b) FTOS fix
   qw/server/pr_cmds.c
   c) MOVETYPE_PUSH fix (must be extended when include SinglePlayer)
   qw/server/world.c
   qw/server/sv_phys.c
   d) SV_MAXVELOCITY fix
   qw/server/sv_phys.c

#2 QW bound keys not saved in quotes fix
qw/client/keys.c

#3 QW frontend.cfg not executed when config.cfg missing fix
qw/client/cl_parse.c

#4 QW typo in syntax explanation of "user" command
qw/server/sv_ccmds.c


1999-12-24:
-----------
#1 added explicit brackets
winquake/menu.c
winquake/cl_input.c
winquake/host_cmd.c

#2 logical correction of if statement
winquake/host.c

#3 typos (not included as files, just do a replace over all source files => *.c,*.h,*.s,*.asm,*.qc)
allready -> already


1999-12-23:
-----------
#1 Coop not cleared when maxplayers changed (e.g. selecting SinglePlayer through menu)
winquake/net_main.c

#2 Deathmatch/Coop not at the same time
winquake/cvar.c

#3 Weird cvar zeros fix
winquake/cvar.c

#4 FTOS fix
winquake/pr_cmds.c

#5 More PAK files support (necessary for XMen, set to 64 for muliple "-game" parameters :)
winquake/sys_null.c
winquake/sys_sun.c
winquake/sys_win.c
winquake/sys_wind.c

#6 MOVETYPE_PUSH fix
winquake/world.c
winquake/sv_phys.c

#7 SV_MAXVELOCITY fix
winquake/sv_phys.c

#8 multiple "-game" parameters
winquake/common.c
