1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00

SDK sync.

This commit is contained in:
Scott Ehlert 2011-04-15 17:50:57 -05:00
parent 753fe25c18
commit 4164d6627a
4 changed files with 18 additions and 5 deletions

View File

@ -62,7 +62,7 @@ CExperienceReport::CExperienceReport( vgui::Panel *parent, const char *name ) :
m_pCheatsUsedLabel->SetVisible( ASWGameRules() && ASWGameRules()->m_bCheated.Get() );
m_pUnofficialMapLabel = new vgui::Label( this, "UnofficialMapLabel", "#asw_unofficial_map" );
m_pUnofficialMapLabel->SetVisible( GetClientModeASW() && !GetClientModeASW()->IsOfficialMap() );
m_pUnofficialMapLabel->SetVisible( false ); //GetClientModeASW() && !GetClientModeASW()->IsOfficialMap() );
m_iPlayerLevel = 0;
m_pszWeaponUnlockClass = NULL;
@ -185,7 +185,7 @@ void CExperienceReport::OnThink()
m_pCheatsUsedLabel->SetVisible( bShowCheatsLabel );
InvalidateLayout();
}
bool bShowUnofficialMapLabel = ( GetClientModeASW() && !GetClientModeASW()->IsOfficialMap() );
bool bShowUnofficialMapLabel = false; //( GetClientModeASW() && !GetClientModeASW()->IsOfficialMap() );
if ( bShowUnofficialMapLabel != m_pUnofficialMapLabel->IsVisible() )
{
m_pUnofficialMapLabel->SetVisible( bShowUnofficialMapLabel );

View File

@ -706,6 +706,12 @@ void CViewEffects::Shake( const ScreenShake_t &data )
pNewShake->duration = data.duration;
pNewShake->nextShake = 0;
pNewShake->endtime = gpGlobals->curtime + data.duration;
if ( prediction && prediction->InPrediction() )
{
pNewShake->endtime = prediction->GetSavedTime() + data.duration;
}
pNewShake->command = data.command;
pNewShake->direction = data.direction;
pNewShake->nShakeType = data.direction.IsZeroFast() ? screenshake_t::kSHAKE_BASIC : screenshake_t::kSHAKE_DIRECTIONAL;

View File

@ -208,8 +208,8 @@ void CASW_Player::CalculateEarnedXP()
if ( engine->IsPlayingDemo() )
return;
if ( GetClientModeASW() && !GetClientModeASW()->IsOfficialMap() )
return;
//if ( GetClientModeASW() && !GetClientModeASW()->IsOfficialMap() )
//return;
#endif
int iNumObjectives = 0;

View File

@ -909,8 +909,15 @@ const char* CASW_Weapon_Heal_Gun::GetPartialReloadSound(int iPart)
void CASW_Weapon_Heal_Gun::UpdateEffects()
{
if ( m_hHealEntity.Get() && m_hHealEntity.Get()->Classify() != CLASS_ASW_MARINE )
if ( !m_hHealEntity.Get() || m_hHealEntity.Get()->Classify() != CLASS_ASW_MARINE || !GetMarine() )
{
if ( m_pDischargeEffect )
{
m_pDischargeEffect->StopEmission();
m_pDischargeEffect = NULL;
}
return;
}
C_ASW_Marine* pMarine = static_cast<C_ASW_Marine*>( static_cast<C_BaseEntity*>( m_hHealEntity.Get() ) );
bool bHealingSelf = pMarine ? (pMarine == GetMarine()) : false;