diff --git a/reaction/cgame/cg_ents.c b/reaction/cgame/cg_ents.c index 4f2817d4..cedf4cff 100644 --- a/reaction/cgame/cg_ents.c +++ b/reaction/cgame/cg_ents.c @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.47 2003/09/10 21:40:35 makro +// Cooler breath puffs. Locked r_fastSky on maps with global fog. +// Some other things I can't remember. +// // Revision 1.46 2003/09/07 19:51:39 makro // no message // @@ -109,6 +113,7 @@ static void CG_LaserSight(centity_t * cent); static void CG_Dlight(centity_t * cent); +static void CG_FakeShadow(centity_t * cent); extern char rq3_breakables[RQ3_MAX_BREAKABLES][80]; @@ -1076,6 +1081,9 @@ static void CG_AddCEntity(centity_t * cent) case ET_DLIGHT: CG_Dlight(cent); break; + case ET_SHADOW: + CG_FakeShadow(cent); + break; } } @@ -1254,3 +1262,8 @@ static void CG_Dlight(centity_t * cent) //CG_Printf("cgame: (%f %f %f)\n", cent->lerpOrigin[0], cent->lerpOrigin[1], cent->lerpOrigin[2]); } } + +static void CG_FakeShadow(centity_t * cent) +{ + return; +} diff --git a/reaction/cgame/cg_local.h b/reaction/cgame/cg_local.h index 31d9e952..7ce6cd38 100644 --- a/reaction/cgame/cg_local.h +++ b/reaction/cgame/cg_local.h @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.153 2003/09/10 21:40:35 makro +// Cooler breath puffs. Locked r_fastSky on maps with global fog. +// Some other things I can't remember. +// // Revision 1.152 2003/09/07 19:51:40 makro // no message // @@ -1137,6 +1141,9 @@ typedef struct { int lastServerTime; playerState_t savedPmoveStates[NUM_SAVED_STATES]; int stateHead, stateTail; + //Makro - true if the user wants fastsky on. We'll force it to off for maps + //that have a _rq3_fog_color set + int wantsFastSky; } cg_t; //Blaze: struct to hold the func_breakable stuff @@ -1873,6 +1880,9 @@ extern vmCvar_t cg_teamChatsOnly; extern vmCvar_t cg_noVoiceChats; extern vmCvar_t cg_noVoiceText; extern vmCvar_t cg_scorePlum; +//Makro - fastsky +extern vmCvar_t cg_fastSky; +extern vmCvar_t cg_RQ3_wantFastSky; //extern vmCvar_t cg_smoothClients; extern vmCvar_t pmove_fixed; extern vmCvar_t pmove_msec; diff --git a/reaction/cgame/cg_main.c b/reaction/cgame/cg_main.c index 32ccb2f8..cc8f9749 100644 --- a/reaction/cgame/cg_main.c +++ b/reaction/cgame/cg_main.c @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.140 2003/09/10 21:40:35 makro +// Cooler breath puffs. Locked r_fastSky on maps with global fog. +// Some other things I can't remember. +// // Revision 1.139 2003/09/01 15:09:48 jbravo // Cleanups, crashbug fix and version bumped to 3.2 // @@ -589,6 +593,9 @@ vmCvar_t cg_RQ3_predictWeapons; //Makro: avidemo with jpegs vmCvar_t cg_RQ3_avidemo; +//Makro - fastsky +vmCvar_t cg_fastSky; +vmCvar_t cg_RQ3_wantFastSky; vmCvar_t cg_drawFriend; vmCvar_t cg_teamChatsOnly; vmCvar_t cg_noVoiceChats; @@ -861,6 +868,9 @@ static cvarTable_t cvarTable[] = { // bk001129 {&cg_trueLightning, "cg_trueLightning", "0.0", CVAR_ARCHIVE}, //Makro - avidemo with jpegs {&cg_RQ3_avidemo, "cg_RQ3_avidemo", "0", 0}, + //Makro - fastsky + {&cg_fastSky, "r_fastSky", "0", CVAR_ARCHIVE}, + {&cg_RQ3_wantFastSky, "cg_RQ3_wantFastSky", "0", CVAR_ARCHIVE}, // JBravo: added //Slicer: no longer needed. // { &cg_RQ3_lca, "cg_RQ3_lca", "0", CVAR_ROM}, @@ -1052,6 +1062,8 @@ void CG_UpdateCvars(void) { int i; cvarTable_t *cv; + //Makro - added + int fastSkyModCount = cg_fastSky.modificationCount; for (i = 0, cv = cvarTable; i < cvarTableSize; i++, cv++) { // JBravo: unlagged @@ -1063,6 +1075,22 @@ void CG_UpdateCvars(void) // check for modications here + //Makro - lock r_fastsky on maps with global fog + if (cg_fastSky.modificationCount != fastSkyModCount) + { + char buf[256]={0}; + trap_Cvar_VariableStringBuffer("r_fastSky", buf, sizeof(buf)); + if (cgs.clearColorSet) { + if (atoi(buf)) { + CG_Printf("Fast sky cannot be used on this map.\n"); + trap_Cvar_Set("r_fastSky", "0"); + trap_Cvar_Update(&cg_fastSky); + } + } else { + trap_Cvar_Set("cg_RQ3_wantFastSky", buf); + } + } + // If team overlay is on, ask for updates from the server. If its off, // let the server know so we don't receive it if (drawTeamOverlayModificationCount != cg_drawTeamOverlay.modificationCount) { @@ -2935,6 +2963,17 @@ void CG_Init(int serverMessageNum, int serverCommandSequence, int clientNum) //Slicer: For the anti-cheat system //trap_Cvar_Set("cg_RQ3_Auth","0"); trap_SendClientCommand("SendCheatCvars"); + //Makro - check if the map has a _rq3_fog_color + if (cgs.clearColorSet) { + char buf[256]={0}; + trap_Cvar_VariableStringBuffer("r_fastSky", buf, sizeof(buf)); + trap_Cvar_Set("cg_RQ3_wantFastSky", buf); + trap_Cvar_Set("r_fastSky", "0"); + } else { + char buf[256]={0}; + trap_Cvar_VariableStringBuffer("cg_RQ3_wantFastSky", buf, sizeof(buf)); + trap_Cvar_Set("r_fastSky", buf); + } } /* @@ -2948,6 +2987,11 @@ void CG_Shutdown(void) { // some mods may need to do cleanup work here, // like closing files or archiving session data + + //Makro - reset fastsky + char buf[256]={0}; + trap_Cvar_VariableStringBuffer("cg_RQ3_wantFastSky", buf, sizeof(buf)); + trap_Cvar_Set("r_fastSky", buf); } /* diff --git a/reaction/cgame/cg_players.c b/reaction/cgame/cg_players.c index 20810121..e5766ecb 100644 --- a/reaction/cgame/cg_players.c +++ b/reaction/cgame/cg_players.c @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.63 2003/09/10 21:40:35 makro +// Cooler breath puffs. Locked r_fastSky on maps with global fog. +// Some other things I can't remember. +// // Revision 1.62 2003/09/01 15:09:48 jbravo // Cleanups, crashbug fix and version bumped to 3.2 // @@ -1880,11 +1884,19 @@ CG_BreathPuffs // NiceAss: Used now. No londer MISSIONPACK =============== */ +#define NUM_BREATH_PUFFS 4 +#define BREATH_PUFF_LIFE 1100 +#define BREATH_PUFF_LIFE_EXTRA 400 +#define BREATH_PUFF_ALPHA 0.4 +#define BREATH_PUFF_SIZE 8 +#define BREATH_PUFF + static void CG_BreathPuffs(centity_t * cent, refEntity_t * head) { clientInfo_t *ci; - vec3_t up, origin; - int contents; + vec3_t dir, origin; + int contents, i; + localEntity_t *puff[NUM_BREATH_PUFFS]; ci = &cgs.clientinfo[cent->currentState.number]; @@ -1905,13 +1917,29 @@ static void CG_BreathPuffs(centity_t * cent, refEntity_t * head) return; } - VectorSet(up, 0, 0, 8); - VectorMA(head->origin, 8, head->axis[0], origin); - VectorMA(origin, -4, head->axis[2], origin); + //VectorSet(up, 0, 0, 8); + VectorMA(head->origin, 6, head->axis[0], origin); + VectorMA(origin, -2, head->axis[2], origin); //Makro - the damn thing was too big ! //Changed 'radius' from 16 to 8 and alpha from 1 to 0.4 - CG_SmokePuff(origin, up, 8, 1, 1, 1, 0.4f, 1500, cg.time, cg.time + 400, LEF_PUFF_DONT_SCALE, - cgs.media.shotgunSmokePuffShader); + //CG_SmokePuff(origin, up, 8, 1, 1, 1, 0.4f, 1500, cg.time, cg.time + 400, LEF_PUFF_DONT_SCALE, + // cgs.media.shotgunSmokePuffShader); + + //cool new code + for (i=0; iaxis[0], dir); + //forward + VectorMA(dir, crandom() * 0.3f, head->axis[0], dir); + //left-right + VectorMA(dir, crandom() * 0.3f, head->axis[1], dir); + //up-down + VectorMA(dir, -0.3f + crandom() * 0.3f, head->axis[2], dir); + VectorScale(dir, 3+random()*3, dir); + puff[i] = CG_SmokePuff(origin, dir, 3.5f+crandom()*0.5f, 1, 1, 1, 0.15f+crandom()*0.05f, 1000+random()*500, cg.time, 0, + LEF_PUFF_DONT_SCALE, cgs.media.shotgunSmokePuffShader); + } + ci->breathPuffTime = cg.time + 2000; } @@ -2258,8 +2286,9 @@ static qboolean CG_PlayerShadow(centity_t * cent, float *shadowPlane) // add the mark as a temporary, so it goes directly to the renderer // without taking a spot in the cg_marks array + //Makro - 24 is too big, changing to 20 CG_ImpactMark(cgs.media.shadowMarkShader, trace.endpos, trace.plane.normal, - cent->pe.legs.yawAngle, alpha, alpha, alpha, 1, qfalse, 24, qtrue); + cent->pe.legs.yawAngle, alpha, alpha, alpha, 1, qfalse, 20, qtrue); return qtrue; } diff --git a/reaction/cgame/cg_servercmds.c b/reaction/cgame/cg_servercmds.c index 266eb6fb..c09c1078 100644 --- a/reaction/cgame/cg_servercmds.c +++ b/reaction/cgame/cg_servercmds.c @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.74 2003/09/10 21:40:35 makro +// Cooler breath puffs. Locked r_fastSky on maps with global fog. +// Some other things I can't remember. +// // Revision 1.73 2003/08/10 20:13:26 makro // no message // @@ -488,6 +492,10 @@ void CG_SetConfigValues(void) CG_ParseFogHull( CG_ConfigString(CS_FOGHULL) ); //Makro - sky portal CG_ParseSkyPortal( CG_ConfigString(CS_SKYPORTAL) ); + //Makro - fake shadows + s = Info_ValueForKey(CG_ConfigString(CS_SHADOWS), "1"); + if (s && *s) + trap_R_RegisterShaderNoMip(s); } /* diff --git a/reaction/cgame/cgame.plg b/reaction/cgame/cgame.plg index 4ffde8c8..b1011b96 100644 --- a/reaction/cgame/cgame.plg +++ b/reaction/cgame/cgame.plg @@ -6,33 +6,13 @@ --------------------Configuration: cgame - Win32 Release--------------------

Command Lines

-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP32B.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP18A.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_atmospheric.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_consolecmds.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_draw.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_drawtools.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_effects.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_ents.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_event.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_info.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_localents.c" "C:\Games\Quake3\rq3source\reaction\cgame\cg_main.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_marks.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_players.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_playerstate.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_predict.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_scoreboard.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_servercmds.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_snapshot.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_syscalls.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_unlagged.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_view.c" -"C:\Games\Quake3\rq3source\reaction\cgame\cg_weapons.c" ] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP32B.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP32C.tmp" with contents +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP18A.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP18B.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 @@ -63,39 +43,13 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP32C.tmp" with conte .\Release\q_shared.obj .\Release\ui_shared.obj ] -Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP32C.tmp" +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP18B.tmp"

Output Window

Compiling... -cg_atmospheric.c -cg_consolecmds.c -C:\Games\Quake3\rq3source\reaction\cgame\cg_atmospheric.c(626) : warning C4706: assignment within conditional expression -C:\Games\Quake3\rq3source\reaction\cgame\cg_atmospheric.c(638) : warning C4706: assignment within conditional expression -C:\Games\Quake3\rq3source\reaction\cgame\cg_atmospheric.c(184) : warning C4701: local variable 'tr' may be used without having been initialized -C:\Games\Quake3\rq3source\reaction\cgame\cg_atmospheric.c(334) : warning C4701: local variable 'tr' may be used without having been initialized -cg_draw.c -cg_drawtools.c -cg_effects.c -cg_ents.c -cg_event.c -cg_info.c -cg_localents.c cg_main.c -cg_marks.c -cg_players.c -cg_playerstate.c -cg_predict.c -cg_scoreboard.c -C:\Games\Quake3\rq3source\reaction\cgame\cg_predict.c(805) : warning C4701: local variable 'predictCmd' may be used without having been initialized -C:\Games\Quake3\rq3source\reaction\cgame\cg_predict.c(809) : warning C4701: local variable 'stateIndex' may be used without having been initialized -cg_servercmds.c -cg_snapshot.c -cg_syscalls.c -cg_unlagged.c -cg_view.c -C:\Games\Quake3\rq3source\reaction\cgame\cg_view.c(1010) : error C2065: 'ADDENT_NOSKYPORTAL' : undeclared identifier -cg_weapons.c -Error executing cl.exe. -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP32D.tmp" with contents +Linking... + Creating library Release/cgamex86.lib and object Release/cgamex86.exp +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP18F.tmp" with contents [ /nologo /o"Release/cgame.bsc" .\Release\bg_misc.sbr @@ -125,14 +79,14 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP32D.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\RSP32D.tmp" +Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP18F.tmp" Creating browse info file...

Output Window

Results

-cgamex86.dll - 1 error(s), 6 warning(s) +cgamex86.dll - 0 error(s), 0 warning(s)