From 743a0c3f35f0ffb7173e8c4cf60e37b97667dae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Troch?= Date: Tue, 30 Dec 2014 14:41:04 +0100 Subject: [PATCH 1/3] Minor fix for CBasePlayerWeapon::ExtractAmmo This get rid of the warning with "iReturn not being initialized" with debug binaries for weapons which doesn't use ammo (crowbar for example). --- dlls/weapons.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/weapons.cpp b/dlls/weapons.cpp index cdee5d7..f136374 100644 --- a/dlls/weapons.cpp +++ b/dlls/weapons.cpp @@ -1139,7 +1139,7 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther ) //========================================================= int CBasePlayerWeapon::ExtractAmmo( CBasePlayerWeapon *pWeapon ) { - int iReturn; + int iReturn = 0; if ( pszAmmo1() != NULL ) { From fe047f69337547be743971521e94e5d7ec51b959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Troch?= Date: Tue, 30 Dec 2014 14:46:38 +0100 Subject: [PATCH 2/3] Same fix applied to Ricochet --- ricochet/dlls/weapons.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ricochet/dlls/weapons.cpp b/ricochet/dlls/weapons.cpp index 2805abc..1987137 100644 --- a/ricochet/dlls/weapons.cpp +++ b/ricochet/dlls/weapons.cpp @@ -1003,7 +1003,7 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther ) //========================================================= int CBasePlayerWeapon::ExtractAmmo( CBasePlayerWeapon *pWeapon ) { - int iReturn; + int iReturn = 0; if ( pszAmmo1() != NULL ) { From f5ba47e6a89689f20ea883baff2c7170f3ca8a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Troch?= Date: Tue, 30 Dec 2014 14:47:33 +0100 Subject: [PATCH 3/3] Same fix applied to Deathmatch Classic --- dmc/dlls/weapons.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmc/dlls/weapons.cpp b/dmc/dlls/weapons.cpp index 413dfb8..13ff03f 100644 --- a/dmc/dlls/weapons.cpp +++ b/dmc/dlls/weapons.cpp @@ -1036,7 +1036,7 @@ void CBasePlayerAmmo :: DefaultTouch( CBaseEntity *pOther ) //========================================================= int CBasePlayerWeapon::ExtractAmmo( CBasePlayerWeapon *pWeapon ) { - int iReturn; + int iReturn = 0; if ( pszAmmo1() != NULL ) {