Skip to content

Commit

Permalink
server: spawn mp5 with full ammo only in multiplayer.
Browse files Browse the repository at this point in the history
  • Loading branch information
nekonomicon committed Nov 18, 2023
1 parent fdf49c8 commit 1e4663a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions dlls/mp5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

Expand Down
3 changes: 2 additions & 1 deletion dlls/weapons.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1e4663a

Please sign in to comment.