From 7244520442f4942290c96fc9cd59c4a211a9d175 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Thu, 10 Nov 2022 01:20:45 +0100 Subject: [PATCH] CBaseFileSystem::VMountVPKFile light cleanup --- r5dev/filesystem/basefilesystem.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/r5dev/filesystem/basefilesystem.cpp b/r5dev/filesystem/basefilesystem.cpp index c0a19764..903b0363 100644 --- a/r5dev/filesystem/basefilesystem.cpp +++ b/r5dev/filesystem/basefilesystem.cpp @@ -130,11 +130,14 @@ VPKData_t* CBaseFileSystem::VMountVPKFile(CBaseFileSystem* pFileSystem, const ch int nHandle = v_CBaseFileSystem_GetMountedVPKHandle(pFileSystem, pszVpkPath); VPKData_t* pPakData = v_CBaseFileSystem_MountVPKFile(pFileSystem, pszVpkPath); - if (nHandle < 0 && pPakData) // Only log if VPK hasn't been mounted yet and we have a valid pointer. + if (pPakData) { - ::DevMsg(eDLL_T::FS, "Mounted vpk file: '%s' with handle: '%i'\n", pszVpkPath, pPakData->m_nHandle); + if (nHandle < 0) // Only log if VPK hasn't been mounted yet. + { + ::DevMsg(eDLL_T::FS, "Mounted vpk file: '%s' with handle: '%i'\n", pszVpkPath, pPakData->m_nHandle); + } } - else if (!pPakData) // VPK failed to load or does not exist... + else // VPK failed to load or does not exist... { ::Warning(eDLL_T::FS, "Unable to mount vpk file: '%s'\n", pszVpkPath); }