From e7989d438a4eea04317fc4dd7b79b34c9c18f3d8 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Sun, 15 Oct 2017 00:12:26 +0500 Subject: [PATCH] Fix compatibility with MSVC 6. --- cl_dll/ammo.cpp | 6 +++--- dlls/player.cpp | 2 +- dlls/scientist.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cl_dll/ammo.cpp b/cl_dll/ammo.cpp index edc21652..4104acff 100644 --- a/cl_dll/ammo.cpp +++ b/cl_dll/ammo.cpp @@ -305,7 +305,7 @@ void CHudAmmo::Reset( void ) gHR.Reset(); //VidInit(); - wrect_t nullrc = {}; + wrect_t nullrc = {0,}; SetCrosshair( 0, nullrc, 0, 0, 0 ); // reset crosshair m_pWeapon = NULL; // reset last weapon } @@ -539,7 +539,7 @@ int CHudAmmo::MsgFunc_HideWeapon( const char *pszName, int iSize, void *pbuf ) if( gHUD.m_iHideHUDDisplay & ( HIDEHUD_WEAPONS | HIDEHUD_ALL ) ) { - wrect_t nullrc = {}; + wrect_t nullrc = {0,}; gpActiveSel = NULL; SetCrosshair( 0, nullrc, 0, 0, 0 ); } @@ -559,7 +559,7 @@ int CHudAmmo::MsgFunc_HideWeapon( const char *pszName, int iSize, void *pbuf ) // int CHudAmmo::MsgFunc_CurWeapon( const char *pszName, int iSize, void *pbuf ) { - wrect_t nullrc = {}; + wrect_t nullrc = {0,}; int fOnTarget = FALSE; BEGIN_READ( pbuf, iSize ); diff --git a/dlls/player.cpp b/dlls/player.cpp index 38038b36..e5a01bae 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -666,7 +666,7 @@ void CBasePlayer::PackDeadPlayerItems( void ) int iWeaponRules; int iAmmoRules; int i; - CBasePlayerWeapon *rgpPackWeapons[MAX_WEAPONS] = {}; + CBasePlayerWeapon *rgpPackWeapons[MAX_WEAPONS] = {0,}; int iPackAmmo[MAX_AMMO_SLOTS]; int iPW = 0;// index into packweapons array int iPA = 0;// index into packammo array diff --git a/dlls/scientist.cpp b/dlls/scientist.cpp index 7cf9cc4d..7e94b286 100644 --- a/dlls/scientist.cpp +++ b/dlls/scientist.cpp @@ -467,7 +467,7 @@ void CScientist::StartTask( Task_t *pTask ) //The enemy can be null here. - Solokiller //Discovered while testing the barnacle grapple on headcrabs with scientists in view. - if( m_hEnemy && m_hEnemy->IsPlayer() ) + if( m_hEnemy != 0 && m_hEnemy->IsPlayer() ) PlaySentence( "SC_PLFEAR", 5, VOL_NORM, ATTN_NORM ); else PlaySentence( "SC_FEAR", 5, VOL_NORM, ATTN_NORM );