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] 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 2b2d07ab..53323a74 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 9346e984..e4966125 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -136,7 +136,8 @@ public: // 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