From fdf49c8974254db582951c38932b96f96d526dc2 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Sat, 18 Nov 2023 13:24:37 +0300 Subject: [PATCH 1/3] Add mention of Windows SDK in build Prerequisites [ci skip] (#410) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e1fbcccf7e..706fa58a6d 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ git clone --recursive https://github.com/FWGS/hlsdk-portable ### Prerequisites -Install and run [Visual Studio Installer](https://visualstudio.microsoft.com/downloads/). The installer allows you to choose specific components. Select `Desktop development with C++`. You can untick everything you don't need in Installation details, but you must keep `MSVC` ticked. You may also keep `C++ CMake tools for Windows` ticked as you'll need **cmake**. Alternatively you can install **cmake** from the [cmake.org](https://cmake.org/download/) and during installation tick *Add to the PATH...*. +Install and run [Visual Studio Installer](https://visualstudio.microsoft.com/downloads/). The installer allows you to choose specific components. Select `Desktop development with C++`. You can untick everything you don't need in Installation details, but you must keep `MSVC` and corresponding Windows SDK (e.g. Windows 10 SDK or Windows 11 SDK) ticked. You may also keep `C++ CMake tools for Windows` ticked as you'll need **cmake**. Alternatively you can install **cmake** from the [cmake.org](https://cmake.org/download/) and during installation tick *Add to the PATH...*. ### Opening command prompt From 1e4663ab7344d8c391f67e20044367d908e58292 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Sat, 18 Nov 2023 22:41:25 +0500 Subject: [PATCH 2/3] server: spawn mp5 with full ammo only in multiplayer. --- dlls/mp5.cpp | 7 +++++++ dlls/weapons.h | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/mp5.cpp b/dlls/mp5.cpp index 2b2d07ab97..53323a74dd 100644 --- a/dlls/mp5.cpp +++ b/dlls/mp5.cpp @@ -54,6 +54,13 @@ void CMP5::Spawn() m_iDefaultAmmo = MP5_DEFAULT_GIVE; +#if CLIENT_DLL + if( bIsMultiplayer() ) +#else + if( g_pGameRules->IsMultiplayer() ) +#endif + m_iDefaultAmmo = MP5_DEFAULT_GIVE_MP; + FallInit();// get ready to fall down. } diff --git a/dlls/weapons.h b/dlls/weapons.h index 9346e98444..e49661250f 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -136,7 +136,8 @@ class CGrenade : public CBaseMonster // the default amount of ammo that comes with each gun when it spawns #define GLOCK_DEFAULT_GIVE 17 #define PYTHON_DEFAULT_GIVE 6 -#define MP5_DEFAULT_GIVE 50 +#define MP5_DEFAULT_GIVE 25 +#define MP5_DEFAULT_GIVE_MP MP5_MAX_CLIP #define MP5_M203_DEFAULT_GIVE 0 #define SHOTGUN_DEFAULT_GIVE 12 #define CROSSBOW_DEFAULT_GIVE 5 From 78c00360468735f677b308ba68ac9cd6bc5a002b Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Sat, 18 Nov 2023 23:00:06 +0500 Subject: [PATCH 3/3] server: reduce hornetgun recharge time only in multiplayer. --- dlls/hornetgun.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/dlls/hornetgun.cpp b/dlls/hornetgun.cpp index f43adfd257..1ae35df23d 100644 --- a/dlls/hornetgun.cpp +++ b/dlls/hornetgun.cpp @@ -137,7 +137,12 @@ void CHgun::PrimaryAttack() CBaseEntity *pHornet = CBaseEntity::Create( "hornet", m_pPlayer->GetGunPosition() + gpGlobals->v_forward * 16.0f + gpGlobals->v_right * 8.0f + gpGlobals->v_up * -12.0f, m_pPlayer->pev->v_angle, m_pPlayer->edict() ); pHornet->pev->velocity = gpGlobals->v_forward * 300.0f; - m_flRechargeTime = gpGlobals->time + 0.5f; + float flRechargeTimePause = 0.5f; + + if( g_pGameRules->IsMultiplayer() ) + flRechargeTimePause = 0.3f; + + m_flRechargeTime = gpGlobals->time + flRechargeTimePause; #endif m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--; @@ -223,8 +228,14 @@ void CHgun::SecondaryAttack( void ) pHornet->SetThink( &CHornet::StartDart ); - m_flRechargeTime = gpGlobals->time + 0.5f; + float flRechargeTimePause = 0.5f; + + if( g_pGameRules->IsMultiplayer() ) + flRechargeTimePause = 0.3f; + + m_flRechargeTime = gpGlobals->time + flRechargeTimePause; #endif + int flags; #if CLIENT_WEAPONS flags = FEV_NOTHOST; @@ -251,8 +262,16 @@ void CHgun::Reload( void ) while( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] < HORNET_MAX_CARRY && m_flRechargeTime < gpGlobals->time ) { + float flRechargeTimePause = 0.5f; +#if CLIENT_DLL + if( bIsMultiplayer() ) +#else + if( g_pGameRules->IsMultiplayer() ) +#endif + flRechargeTimePause = 0.3f; + m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]++; - m_flRechargeTime += 0.3f; + m_flRechargeTime += flRechargeTimePause; } }