This is an automated email from the git hooks/post-receive script. smcv pushed a commit to annotated tag 1.42d in repository iortcw.
commit 76900c3b70537f9257f4907092705698465002c3 Author: nate....@gmail.com <nate....@gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a> Date: Mon Apr 28 01:54:38 2014 +0000 Client enhancements, added following features: - cg_crosshairPulse - cg_drawWeaponIconFlash - cg_bloodDamageBlend - cg_bloodFlash - cg_muzzleFlash - cg_complaintPopUp --- MP/code/cgame/cg_draw.c | 24 +++++++++++++++--------- MP/code/cgame/cg_local.h | 8 ++++++++ MP/code/cgame/cg_main.c | 20 +++++++++++++++++++- MP/code/cgame/cg_newdraw.c | 32 ++++++++++++++++++++++++++------ MP/code/cgame/cg_view.c | 5 +++-- MP/code/cgame/cg_weapons.c | 5 +++++ 6 files changed, 76 insertions(+), 18 deletions(-) diff --git a/MP/code/cgame/cg_draw.c b/MP/code/cgame/cg_draw.c index c91db76..d4257d0 100644 --- a/MP/code/cgame/cg_draw.c +++ b/MP/code/cgame/cg_draw.c @@ -1685,7 +1685,7 @@ static void CG_DrawCrosshair( void ) { w = h = cg_crosshairSize.value; // RF, crosshair size represents aim spread - f = (float)cg.snap->ps.aimSpreadScale / 255.0; + f = (float)((cg_crosshairPulse.integer == 0) ? 0 : cg.snap->ps.aimSpreadScale / 255.0); w *= ( 1 + f * 2.0 ); h *= ( 1 + f * 2.0 ); @@ -2229,8 +2229,8 @@ static void CG_DrawVote( void ) { s = "Server Host cannot be complained against"; CG_DrawStringExt( 8, 200, CG_TranslateString( s ), color, qtrue, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 80 ); return; - } - if ( cgs.complaintClient == -4 ) { + } // L0 - Complaint popup + if (cgs.complaintClient == -4 && cg_complaintPopUp.integer) { s = "You were team-killed by the Server Host"; CG_DrawStringExt( 8, 200, CG_TranslateString( s ), color, qtrue, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 80 ); return; @@ -2245,12 +2245,16 @@ static void CG_DrawVote( void ) { Q_strncpyz( str2, "vote no", 32 ); } - s = va( CG_TranslateString( "File complaint against %s for team-killing?" ), cgs.clientinfo[cgs.complaintClient].name ); - CG_DrawStringExt( 8, 200, s, color, qtrue, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 80 ); + // L0 - Complaint popup wrapper + if (cg_complaintPopUp.integer) + { + s = va(CG_TranslateString("File complaint against %s for team-killing?"), cgs.clientinfo[cgs.complaintClient].name); + CG_DrawStringExt(8, 200, s, color, qtrue, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 80); - s = va( CG_TranslateString( "Press '%s' for YES, or '%s' for No" ), str1, str2 ); - CG_DrawStringExt( 8, 214, s, color, qtrue, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 80 ); - return; + s = va(CG_TranslateString("Press '%s' for YES, or '%s' for No"), str1, str2); + CG_DrawStringExt(8, 214, s, color, qtrue, qfalse, TINYCHAR_WIDTH, TINYCHAR_HEIGHT, 80); + return; + } } if ( !cgs.voteTime ) { @@ -2771,7 +2775,9 @@ static void CG_DrawFlashDamage( void ) { } VectorSet( col, 0.2, 0, 0 ); - col[3] = 0.7 * ( redFlash / 5.0 ); + col[3] = 0.7 * (redFlash / 5.0) * ( (cg_bloodFlash.value > 1.0) ? 1.0 : + (cg_bloodFlash.value < 0.0) ? 0.0 : + cg_bloodFlash.value ); CG_FillRect( -10, -10, 650, 490, col ); } diff --git a/MP/code/cgame/cg_local.h b/MP/code/cgame/cg_local.h index d4fafef..1208f4b 100644 --- a/MP/code/cgame/cg_local.h +++ b/MP/code/cgame/cg_local.h @@ -1770,6 +1770,14 @@ extern vmCvar_t cg_descriptiveText; extern vmCvar_t cg_autoReload; extern vmCvar_t cg_antilag; +// L0 +extern vmCvar_t cg_crosshairPulse; +extern vmCvar_t cg_bloodDamageBlend; +extern vmCvar_t cg_drawWeaponIconFlash; +extern vmCvar_t cg_bloodFlash; +extern vmCvar_t cg_muzzleFlash; +extern vmCvar_t cg_complaintPopUp; + // // cg_main.c // diff --git a/MP/code/cgame/cg_main.c b/MP/code/cgame/cg_main.c index 6084681..e4f6294 100644 --- a/MP/code/cgame/cg_main.c +++ b/MP/code/cgame/cg_main.c @@ -279,6 +279,15 @@ vmCvar_t cg_bluelimbotime; vmCvar_t cg_autoReload; vmCvar_t cg_antilag; +// L0 +vmCvar_t cg_crosshairPulse; +vmCvar_t cg_drawWeaponIconFlash; +vmCvar_t cg_bloodDamageBlend; +vmCvar_t cg_bloodFlash; +vmCvar_t cg_muzzleFlash; +vmCvar_t cg_complaintPopUp; +// ~L0 + typedef struct { vmCvar_t *vmCvar; char *cvarName; @@ -478,7 +487,16 @@ cvarTable_t cvarTable[] = { { &cg_autoReload, "cg_autoReload", "1", CVAR_ARCHIVE }, - { &cg_antilag, "g_antilag", "0", 0 } + { &cg_antilag, "g_antilag", "0", 0 }, + + // L0 + { &cg_crosshairPulse, "cg_crosshairPulse", "1", CVAR_ARCHIVE }, + { &cg_drawWeaponIconFlash, "cg_drawWeaponIconFlash", "0", CVAR_ARCHIVE }, + { &cg_bloodDamageBlend, "cg_bloodDamageBlend", "1.0", CVAR_ARCHIVE }, + { &cg_bloodFlash, "cg_bloodFlash", "1.0", CVAR_ARCHIVE }, + { &cg_muzzleFlash, "cg_muzzleFlash", "1", CVAR_ARCHIVE }, + { &cg_complaintPopUp, "cg_complaintPopUp", "1", CVAR_ARCHIVE } + // ~L0 }; static int cvarTableSize = ARRAY_LEN( cvarTable ); diff --git a/MP/code/cgame/cg_newdraw.c b/MP/code/cgame/cg_newdraw.c index 5e40249..35ff752 100644 --- a/MP/code/cgame/cg_newdraw.c +++ b/MP/code/cgame/cg_newdraw.c @@ -296,14 +296,34 @@ static void CG_DrawPlayerWeaponIcon( rectDef_t *rect, qboolean drawHighlighted, return; } - if ( drawHighlighted ) { - icon = cg_weapons[ realweap ].weaponIcon[1]; - } else { - icon = cg_weapons[ realweap ].weaponIcon[0]; + if (cg_drawWeaponIconFlash.integer) { + if (cg.snap->ps.weaponstate == WEAPON_RELOADING) { + VectorCopy(colorYellow, hcolor); + icon = cg_weapons[realweap].weaponIcon[1]; + } + else if (cg.snap->ps.weaponstate == WEAPON_FIRING) { + VectorCopy(colorRed, hcolor); + icon = cg_weapons[realweap].weaponIcon[1]; + } + else if (cg.snap->ps.weaponstate == WEAPON_READY) { + VectorCopy(colorYellow, hcolor); + icon = cg_weapons[realweap].weaponIcon[0]; + } + else { + VectorCopy(colorWhite, hcolor); + icon = cg_weapons[realweap].weaponIcon[1]; + } + hcolor[3] = 4.0f; + } // Just wrap default .. + else { + if (drawHighlighted) { + icon = cg_weapons[realweap].weaponIcon[1]; + } + else { + icon = cg_weapons[realweap].weaponIcon[0]; + } } - - // pulsing grenade icon to help the player 'count' in their head if ( cg.predictedPlayerState.grenadeTimeLeft ) { // grenades and dynamite set this diff --git a/MP/code/cgame/cg_view.c b/MP/code/cgame/cg_view.c index d0ce6f0..f57f514 100644 --- a/MP/code/cgame/cg_view.c +++ b/MP/code/cgame/cg_view.c @@ -1024,8 +1024,9 @@ static void CG_DamageBlendBlob( void ) { ent.shaderRGBA[0] = 255; ent.shaderRGBA[1] = 255; ent.shaderRGBA[2] = 255; - ent.shaderRGBA[3] = 255; - trap_R_AddRefEntityToScene( &ent ); + ent.shaderRGBA[3] = 255 * ( (cg_bloodDamageBlend.value > 1.0f) ? 1.0f : + (cg_bloodDamageBlend.value < 0.0f) ? 0.0f : cg_bloodDamageBlend.value); + trap_R_AddRefEntityToScene(&ent); redFlash += ent.radius; } diff --git a/MP/code/cgame/cg_weapons.c b/MP/code/cgame/cg_weapons.c index e28b076..6337c21 100644 --- a/MP/code/cgame/cg_weapons.c +++ b/MP/code/cgame/cg_weapons.c @@ -2657,6 +2657,11 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent flash.hModel = 0; } + // L0 - Disable muzzleFlash if they have it off.. + if (!cg_muzzleFlash.integer) { + flash.hModel = 0; + } + // weaps with barrel smoke if ( ps || cg.renderingThirdPerson || !isPlayer ) { if ( weaponNum == WP_STEN || weaponNum == WP_VENOM ) { -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git _______________________________________________ Pkg-games-commits mailing list Pkg-games-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits