diff options
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 009caf81..6c73b863 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1522,6 +1522,13 @@ void Cmd_Sell_f( gentity_t *ent ) if( weapon != WP_NONE ) { + //are we /allowed/ to sell this? + if( !BG_FindPurchasableForWeapon( weapon ) ) + { + trap_SendServerCommand( ent-g_entities, va( "print \"You can't sell this item\n\"" ) ); + return; + } + //remove weapon if carried if( BG_gotWeapon( weapon, ent->client->ps.stats ) ) { |