Browse Source

Fixes ValveSoftware/halflife#1536

This is merely to keep the VC++ Debug builds happy and addresses cases
where variables where being used without being initalized. There should be
no visible changes apart from non-functional side effects to the users of
Release builds.
Thanks to @fabiosarts for finding and reporting these problems.
Thanks to @LevShisterov for suggeting how to fix geiger.cpp files, which I
followed closely except using <= 800 instead of < 800.
master
Dominik Tugend 7 years ago
parent
commit
062078aedd
6 changed files with 9 additions and 24 deletions
  1. +2
    -6
      cl_dll/geiger.cpp
  2. +1
    -2
      cl_dll/message.cpp
  3. +2
    -6
      dmc/cl_dll/geiger.cpp
  4. +1
    -2
      dmc/cl_dll/message.cpp
  5. +2
    -6
      ricochet/cl_dll/geiger.cpp
  6. +1
    -2
      ricochet/cl_dll/message.cpp

+ 2
- 6
cl_dll/geiger.cpp View File

@@ -68,14 +68,10 @@ int CHudGeiger::Draw (float flTime)
int rg[3];
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
if (m_iGeigerRange > 800)
{
pct = 0; //Con_Printf ( "range > 800\n");
}
else if (m_iGeigerRange > 600)
if (m_iGeigerRange > 600)
{
pct = 2;
flvol = 0.4; //Con_Printf ( "range > 600\n");


+ 1
- 2
cl_dll/message.cpp View File

@@ -147,13 +147,13 @@ void CHudMessage::MessageScanNextChar( void )
srcGreen = m_parms.pMessage->g1;
srcBlue = m_parms.pMessage->b1;
blend = 0; // Pure source
destRed = destGreen = destBlue = 0;

switch( m_parms.pMessage->effect )
{
// Fade-in / Fade-out
case 0:
case 1:
destRed = destGreen = destBlue = 0;
blend = m_parms.fadeBlend;
break;

@@ -168,7 +168,6 @@ void CHudMessage::MessageScanNextChar( void )
{
float deltaTime = m_parms.time - m_parms.charTime;

destRed = destGreen = destBlue = 0;
if ( m_parms.time > m_parms.fadeTime )
{
blend = m_parms.fadeBlend;


+ 2
- 6
dmc/cl_dll/geiger.cpp View File

@@ -68,14 +68,10 @@ int CHudGeiger::Draw (float flTime)
int rg[3];
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
if (m_iGeigerRange > 800)
{
pct = 0; //Con_Printf ( "range > 800\n");
}
else if (m_iGeigerRange > 600)
if (m_iGeigerRange > 600)
{
pct = 2;
flvol = 0.4; //Con_Printf ( "range > 600\n");


+ 1
- 2
dmc/cl_dll/message.cpp View File

@@ -143,13 +143,13 @@ void CHudMessage::MessageScanNextChar( void )
srcGreen = m_parms.pMessage->g1;
srcBlue = m_parms.pMessage->b1;
blend = 0; // Pure source
destRed = destGreen = destBlue = 0;

switch( m_parms.pMessage->effect )
{
// Fade-in / Fade-out
case 0:
case 1:
destRed = destGreen = destBlue = 0;
blend = m_parms.fadeBlend;
break;

@@ -164,7 +164,6 @@ void CHudMessage::MessageScanNextChar( void )
{
float deltaTime = m_parms.time - m_parms.charTime;

destRed = destGreen = destBlue = 0;
if ( m_parms.time > m_parms.fadeTime )
{
blend = m_parms.fadeBlend;


+ 2
- 6
ricochet/cl_dll/geiger.cpp View File

@@ -68,14 +68,10 @@ int CHudGeiger::Draw (float flTime)
int rg[3];
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
if (m_iGeigerRange > 800)
{
pct = 0; //Con_Printf ( "range > 800\n");
}
else if (m_iGeigerRange > 600)
if (m_iGeigerRange > 600)
{
pct = 2;
flvol = 0.4; //Con_Printf ( "range > 600\n");


+ 1
- 2
ricochet/cl_dll/message.cpp View File

@@ -143,13 +143,13 @@ void CHudMessage::MessageScanNextChar( void )
srcGreen = m_parms.pMessage->g1;
srcBlue = m_parms.pMessage->b1;
blend = 0; // Pure source
destRed = destGreen = destBlue = 0;

switch( m_parms.pMessage->effect )
{
// Fade-in / Fade-out
case 0:
case 1:
destRed = destGreen = destBlue = 0;
blend = m_parms.fadeBlend;
break;

@@ -164,7 +164,6 @@ void CHudMessage::MessageScanNextChar( void )
{
float deltaTime = m_parms.time - m_parms.charTime;

destRed = destGreen = destBlue = 0;
if ( m_parms.time > m_parms.fadeTime )
{
blend = m_parms.fadeBlend;


Loading…
Cancel
Save