From a47d55823fec3e6585b05ca4272c002a1e168477 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Tue, 6 Aug 2024 03:26:10 +0700 Subject: [PATCH] Fix compiler warnings --- regamedll/dlls/multiplay_gamerules.cpp | 2 +- regamedll/pm_shared/pm_shared.cpp | 8 ++++---- regamedll/public/tier0/dbg.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp index e1b8a7e4..8ba46556 100644 --- a/regamedll/dlls/multiplay_gamerules.cpp +++ b/regamedll/dlls/multiplay_gamerules.cpp @@ -4293,7 +4293,7 @@ int CHalfLifeMultiplay::ItemShouldRespawn(CItem *pItem) // At what time in the future may this Item respawn? float CHalfLifeMultiplay::FlItemRespawnTime(CItem *pItem) { -#ifdef REGAMEDLL_ADD; +#ifdef REGAMEDLL_ADD return gpGlobals->time + item_respawn_time.value; #else return gpGlobals->time + ITEM_RESPAWN_TIME; diff --git a/regamedll/pm_shared/pm_shared.cpp b/regamedll/pm_shared/pm_shared.cpp index b4049556..544d8fba 100644 --- a/regamedll/pm_shared/pm_shared.cpp +++ b/regamedll/pm_shared/pm_shared.cpp @@ -1902,8 +1902,8 @@ void EXT_FUNC __API_HOOK(PM_Duck)() } #ifdef REGAMEDLL_ADD - if ((pmove->iuser3 & PLAYER_PREVENT_DUCK) == PLAYER_PREVENT_DUCK // Prevent ducking if the iuser3 variable is contain PLAYER_PREVENT_DUCK - || freezetime_duck.value == 0.0f && CSGameRules()->IsFreezePeriod()) // Prevent ducking during freezetime if the freezetime_duck cvar is 0 + if ((pmove->iuser3 & PLAYER_PREVENT_DUCK) == PLAYER_PREVENT_DUCK // Prevent ducking if the iuser3 variable is contain PLAYER_PREVENT_DUCK + || (freezetime_duck.value == 0.0f && CSGameRules()->IsFreezePeriod())) // Prevent ducking during freezetime if the freezetime_duck cvar is 0 { // Try to unduck if (pmove->flags & FL_DUCKING) @@ -2458,8 +2458,8 @@ void EXT_FUNC __API_HOOK(PM_Jump)() } #ifdef REGAMEDLL_ADD - if ((pmove->iuser3 & PLAYER_PREVENT_JUMP) == PLAYER_PREVENT_JUMP // Prevent jumping if the iuser3 variable is contain PLAYER_PREVENT_JUMP - || freezetime_jump.value == 0.0f && CSGameRules()->IsFreezePeriod()) // Prevent jumping during freezetime if the freezetime_jump cvar is 0 + if ((pmove->iuser3 & PLAYER_PREVENT_JUMP) == PLAYER_PREVENT_JUMP // Prevent jumping if the iuser3 variable is contain PLAYER_PREVENT_JUMP + || (freezetime_jump.value == 0.0f && CSGameRules()->IsFreezePeriod())) // Prevent jumping during freezetime if the freezetime_jump cvar is 0 { return; } diff --git a/regamedll/public/tier0/dbg.cpp b/regamedll/public/tier0/dbg.cpp index 35c99fe3..b9bade81 100644 --- a/regamedll/public/tier0/dbg.cpp +++ b/regamedll/public/tier0/dbg.cpp @@ -141,7 +141,7 @@ SpewRetval_t _SpewMessageV(SpewType_t spewType, int level, const char *pMsgForma assert(len < sizeof(szTempBuffer)); // Add \n for warning and assert - if ((spewType == SPEW_ASSERT)) + if (spewType == SPEW_ASSERT) { len += Q_snprintf(&szTempBuffer[len], sizeof(szTempBuffer) - len, "\n"); Plat_OutputDebugString(szTempBuffer);