Skip to content

Commit

Permalink
Implement mp_drop_grenade_enable
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileyAG authored May 27, 2022
1 parent 6bdfa35 commit 6289cac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion game/server/cstrike15/cs_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ ConVar sv_spawn_afk_bomb_drop_time( "sv_spawn_afk_bomb_drop_time", "15", FCVAR_R
extern ConVar spec_replay_winddown_time;

ConVar mp_drop_knife_enable( "mp_drop_knife_enable", "0", FCVAR_RELEASE, "Allows players to drop knives." );
ConVar mp_drop_grenade_enable( "mp_drop_grenade_enable", "1", FCVAR_RELEASE, "Allows players to drop grenades." );

static ConVar tv_relayradio( "tv_relayradio", "0", FCVAR_RELEASE, "Relay team radio commands to TV: 0=off, 1=on" );

Expand Down Expand Up @@ -12864,7 +12865,7 @@ bool CCSPlayer::HandleDropWeapon( CBaseCombatWeapon *pWeapon, bool bSwapping )
default:
{
// let dedicated servers optionally allow droppable knives
if ( type == WEAPONTYPE_KNIFE && mp_drop_knife_enable.GetBool( ) )
if ( (type == WEAPONTYPE_KNIFE && mp_drop_knife_enable.GetBool()) || (type == WEAPONTYPE_GRENADE && mp_drop_grenade_enable.GetBool()) )
{
if ( CSGameRules( )->GetCanDonateWeapon( ) && !pCSWeapon->GetDonated( ) )
{
Expand Down

0 comments on commit 6289cac

Please sign in to comment.