From 60050687cae983aacd40f55c0964231c0f24d6a4 Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Fri, 19 Sep 2003 21:22:52 +0000 Subject: [PATCH] Flares --- reaction/cgame/cg_servercmds.c | 5 ++++- reaction/cgame/cg_view.c | 11 ++++++++--- reaction/cgame/cgame.plg | 18 ++++++------------ 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/reaction/cgame/cg_servercmds.c b/reaction/cgame/cg_servercmds.c index 4f88b10b..afc4be00 100644 --- a/reaction/cgame/cg_servercmds.c +++ b/reaction/cgame/cg_servercmds.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.78 2003/09/19 21:22:52 makro +// Flares +// // Revision 1.77 2003/09/19 00:54:23 makro // Flares again // @@ -453,7 +456,7 @@ static void CG_ParseWarmup(void) void CG_ParseSkyPortal(const char *str) { //sky portal - if (str && str[0] && Q_stricmp(str, "none")) { + if (str && str[0] && Q_stricmp(str, "none") && atoi(Info_ValueForKey(str, "n"))) { cgs.skyPortalOrigin[0] = atof(Info_ValueForKey(str, "x")); cgs.skyPortalOrigin[1] = atof(Info_ValueForKey(str, "y")); cgs.skyPortalOrigin[2] = atof(Info_ValueForKey(str, "z")); diff --git a/reaction/cgame/cg_view.c b/reaction/cgame/cg_view.c index 323cbe52..652c1381 100644 --- a/reaction/cgame/cg_view.c +++ b/reaction/cgame/cg_view.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.41 2003/09/19 21:22:52 makro +// Flares +// // Revision 1.40 2003/09/19 00:54:23 makro // Flares again // @@ -1013,7 +1016,7 @@ static void CG_PlayBufferedSounds(void) //========================================================================= -#define FLARE_FADEOUT_TIME 1000 +#define FLARE_FADEOUT_TIME 600 void CG_AddLensFlare() { @@ -1066,10 +1069,12 @@ void CG_AddLensFlare() if (cg.refdef.fov_x < 90) fovFactor = 5 - 0.05f * cg.refdef.fov_x; - color[0] = color[1] = color[2] = 1.0f; - color[3] = cgs.sunAlpha; + color[0] = color[1] = color[2] = color[3] = cgs.sunAlpha; if (!visible) { fade = 1.0f - (float)timeDelta / FLARE_FADEOUT_TIME; + color[0] *= fade; + color[1] *= fade; + color[2] *= fade; color[3] *= fade; } //sun diff --git a/reaction/cgame/cgame.plg b/reaction/cgame/cgame.plg index aee0b61b..9b95e2a0 100644 --- a/reaction/cgame/cgame.plg +++ b/reaction/cgame/cgame.plg @@ -6,16 +6,13 @@ --------------------Configuration: cgame - Win32 Release--------------------

Command Lines

-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP33F.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP729.tmp" with contents [ /nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR"Release/" /Fp"Release/cgame.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c -"C:\Games\Quake3\rq3source\reaction\cgame\cg_draw.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_main.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_servercmds.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_view.c" ] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP33F.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP340.tmp" with contents +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP729.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP72A.tmp" with contents [ /nologo /base:"0x30000000" /subsystem:windows /dll /incremental:no /pdb:"Release/cgamex86.pdb" /map:"Release/cgamex86.map" /machine:I386 /def:".\cgame.def" /out:"../Release/cgamex86.dll" /implib:"Release/cgamex86.lib" .\Release\bg_misc.obj @@ -46,16 +43,13 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP340.tmp" with conte .\Release\q_shared.obj .\Release\ui_shared.obj ] -Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP340.tmp" +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP72A.tmp"

Output Window

Compiling... -cg_draw.c -cg_main.c -cg_servercmds.c cg_view.c Linking... Creating library Release/cgamex86.lib and object Release/cgamex86.exp -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP344.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP72E.tmp" with contents [ /nologo /o"Release/cgame.bsc" .\Release\bg_misc.sbr @@ -85,7 +79,7 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP344.tmp" with conte .\Release\q_math.sbr .\Release\q_shared.sbr .\Release\ui_shared.sbr] -Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP344.tmp" +Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP72E.tmp" Creating browse info file...

Output Window