mirror of
https://github.com/shawns-valve/halflife.git
synced 2024-11-22 04:21:30 +00:00
Merge pull request #1539 from ripieces/master
Fixes ValveSoftware/halflife#1536
This commit is contained in:
commit
0a1528cfda
6 changed files with 9 additions and 24 deletions
|
@ -68,14 +68,10 @@ int CHudGeiger::Draw (float flTime)
|
||||||
int rg[3];
|
int rg[3];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (m_iGeigerRange < 1000 && m_iGeigerRange > 0)
|
if (m_iGeigerRange <= 800 && m_iGeigerRange > 0)
|
||||||
{
|
{
|
||||||
// peicewise linear is better than continuous formula for this
|
// peicewise linear is better than continuous formula for this
|
||||||
if (m_iGeigerRange > 800)
|
if (m_iGeigerRange > 600)
|
||||||
{
|
|
||||||
pct = 0; //Con_Printf ( "range > 800\n");
|
|
||||||
}
|
|
||||||
else if (m_iGeigerRange > 600)
|
|
||||||
{
|
{
|
||||||
pct = 2;
|
pct = 2;
|
||||||
flvol = 0.4; //Con_Printf ( "range > 600\n");
|
flvol = 0.4; //Con_Printf ( "range > 600\n");
|
||||||
|
|
|
@ -147,13 +147,13 @@ void CHudMessage::MessageScanNextChar( void )
|
||||||
srcGreen = m_parms.pMessage->g1;
|
srcGreen = m_parms.pMessage->g1;
|
||||||
srcBlue = m_parms.pMessage->b1;
|
srcBlue = m_parms.pMessage->b1;
|
||||||
blend = 0; // Pure source
|
blend = 0; // Pure source
|
||||||
|
destRed = destGreen = destBlue = 0;
|
||||||
|
|
||||||
switch( m_parms.pMessage->effect )
|
switch( m_parms.pMessage->effect )
|
||||||
{
|
{
|
||||||
// Fade-in / Fade-out
|
// Fade-in / Fade-out
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
destRed = destGreen = destBlue = 0;
|
|
||||||
blend = m_parms.fadeBlend;
|
blend = m_parms.fadeBlend;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -168,7 +168,6 @@ void CHudMessage::MessageScanNextChar( void )
|
||||||
{
|
{
|
||||||
float deltaTime = m_parms.time - m_parms.charTime;
|
float deltaTime = m_parms.time - m_parms.charTime;
|
||||||
|
|
||||||
destRed = destGreen = destBlue = 0;
|
|
||||||
if ( m_parms.time > m_parms.fadeTime )
|
if ( m_parms.time > m_parms.fadeTime )
|
||||||
{
|
{
|
||||||
blend = m_parms.fadeBlend;
|
blend = m_parms.fadeBlend;
|
||||||
|
|
|
@ -68,14 +68,10 @@ int CHudGeiger::Draw (float flTime)
|
||||||
int rg[3];
|
int rg[3];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (m_iGeigerRange < 1000 && m_iGeigerRange > 0)
|
if (m_iGeigerRange <= 800 && m_iGeigerRange > 0)
|
||||||
{
|
{
|
||||||
// peicewise linear is better than continuous formula for this
|
// peicewise linear is better than continuous formula for this
|
||||||
if (m_iGeigerRange > 800)
|
if (m_iGeigerRange > 600)
|
||||||
{
|
|
||||||
pct = 0; //Con_Printf ( "range > 800\n");
|
|
||||||
}
|
|
||||||
else if (m_iGeigerRange > 600)
|
|
||||||
{
|
{
|
||||||
pct = 2;
|
pct = 2;
|
||||||
flvol = 0.4; //Con_Printf ( "range > 600\n");
|
flvol = 0.4; //Con_Printf ( "range > 600\n");
|
||||||
|
|
|
@ -143,13 +143,13 @@ void CHudMessage::MessageScanNextChar( void )
|
||||||
srcGreen = m_parms.pMessage->g1;
|
srcGreen = m_parms.pMessage->g1;
|
||||||
srcBlue = m_parms.pMessage->b1;
|
srcBlue = m_parms.pMessage->b1;
|
||||||
blend = 0; // Pure source
|
blend = 0; // Pure source
|
||||||
|
destRed = destGreen = destBlue = 0;
|
||||||
|
|
||||||
switch( m_parms.pMessage->effect )
|
switch( m_parms.pMessage->effect )
|
||||||
{
|
{
|
||||||
// Fade-in / Fade-out
|
// Fade-in / Fade-out
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
destRed = destGreen = destBlue = 0;
|
|
||||||
blend = m_parms.fadeBlend;
|
blend = m_parms.fadeBlend;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -164,7 +164,6 @@ void CHudMessage::MessageScanNextChar( void )
|
||||||
{
|
{
|
||||||
float deltaTime = m_parms.time - m_parms.charTime;
|
float deltaTime = m_parms.time - m_parms.charTime;
|
||||||
|
|
||||||
destRed = destGreen = destBlue = 0;
|
|
||||||
if ( m_parms.time > m_parms.fadeTime )
|
if ( m_parms.time > m_parms.fadeTime )
|
||||||
{
|
{
|
||||||
blend = m_parms.fadeBlend;
|
blend = m_parms.fadeBlend;
|
||||||
|
|
|
@ -68,14 +68,10 @@ int CHudGeiger::Draw (float flTime)
|
||||||
int rg[3];
|
int rg[3];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (m_iGeigerRange < 1000 && m_iGeigerRange > 0)
|
if (m_iGeigerRange <= 800 && m_iGeigerRange > 0)
|
||||||
{
|
{
|
||||||
// peicewise linear is better than continuous formula for this
|
// peicewise linear is better than continuous formula for this
|
||||||
if (m_iGeigerRange > 800)
|
if (m_iGeigerRange > 600)
|
||||||
{
|
|
||||||
pct = 0; //Con_Printf ( "range > 800\n");
|
|
||||||
}
|
|
||||||
else if (m_iGeigerRange > 600)
|
|
||||||
{
|
{
|
||||||
pct = 2;
|
pct = 2;
|
||||||
flvol = 0.4; //Con_Printf ( "range > 600\n");
|
flvol = 0.4; //Con_Printf ( "range > 600\n");
|
||||||
|
|
|
@ -143,13 +143,13 @@ void CHudMessage::MessageScanNextChar( void )
|
||||||
srcGreen = m_parms.pMessage->g1;
|
srcGreen = m_parms.pMessage->g1;
|
||||||
srcBlue = m_parms.pMessage->b1;
|
srcBlue = m_parms.pMessage->b1;
|
||||||
blend = 0; // Pure source
|
blend = 0; // Pure source
|
||||||
|
destRed = destGreen = destBlue = 0;
|
||||||
|
|
||||||
switch( m_parms.pMessage->effect )
|
switch( m_parms.pMessage->effect )
|
||||||
{
|
{
|
||||||
// Fade-in / Fade-out
|
// Fade-in / Fade-out
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
destRed = destGreen = destBlue = 0;
|
|
||||||
blend = m_parms.fadeBlend;
|
blend = m_parms.fadeBlend;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -164,7 +164,6 @@ void CHudMessage::MessageScanNextChar( void )
|
||||||
{
|
{
|
||||||
float deltaTime = m_parms.time - m_parms.charTime;
|
float deltaTime = m_parms.time - m_parms.charTime;
|
||||||
|
|
||||||
destRed = destGreen = destBlue = 0;
|
|
||||||
if ( m_parms.time > m_parms.fadeTime )
|
if ( m_parms.time > m_parms.fadeTime )
|
||||||
{
|
{
|
||||||
blend = m_parms.fadeBlend;
|
blend = m_parms.fadeBlend;
|
||||||
|
|
Loading…
Reference in a new issue