Fix various crashes
This commit is contained in:
parent
d083450d70
commit
baa405b724
@ -174,7 +174,8 @@ void DLLEXPORT HUD_ProcessPlayerState( struct entity_state_s *dst, const struct
|
||||
dst->iuser3 = g_iUser3 = src->iuser3;
|
||||
}
|
||||
dst->fuser2 = src->fuser2;
|
||||
iOnTrain[src->number] = src->iuser4;
|
||||
if( src->number > 0 && src->number < MAX_PLAYERS )
|
||||
iOnTrain[src->number] = src->iuser4;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -455,6 +455,10 @@ int CHudSpectator::Draw(float flTime)
|
||||
|
||||
if ( m_vPlayerPos[i][2]<0 ) // marked as invisible ?
|
||||
continue;
|
||||
|
||||
// can player exist without name?
|
||||
if( !g_PlayerInfoList[i+1].name )
|
||||
continue;
|
||||
|
||||
// check if name would be in inset window
|
||||
if ( m_pip->value != INSET_OFF )
|
||||
@ -466,7 +470,7 @@ int CHudSpectator::Draw(float flTime)
|
||||
) continue;
|
||||
}
|
||||
|
||||
color = GetClientColor( i+1 );
|
||||
color = GetClientColor( i+1 ); // ???
|
||||
|
||||
// draw the players name and health underneath
|
||||
sprintf(string, "%s", g_PlayerInfoList[i+1].name );
|
||||
@ -1119,15 +1123,10 @@ void CHudSpectator::DrawOverviewLayer()
|
||||
z *= m_OverviewData.layersHeights[0]; // gOverviewData.z_min - 32;
|
||||
|
||||
// i = r_overviewTexture + ( layer*OVERVIEW_X_TILES*OVERVIEW_Y_TILES );
|
||||
|
||||
gEngfuncs.pTriAPI->RenderMode( kRenderTransTexture );
|
||||
gEngfuncs.pTriAPI->CullFace( TRI_NONE );
|
||||
gEngfuncs.pTriAPI->Color4f( 1.0, 1.0, 1.0, 1.0 );
|
||||
|
||||
frame = 0;
|
||||
|
||||
gEngfuncs.pfnFillRGBA(0, 0, ScreenWidth, ScreenHeight, 0, 0, 0, 0);
|
||||
|
||||
frame = 0;
|
||||
|
||||
// rotated view ?
|
||||
if ( m_OverviewData.rotated )
|
||||
|
Loading…
Reference in New Issue
Block a user