diff options
author | Tim Angus <tim@ngus.net> | 2001-12-30 02:20:36 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2001-12-30 02:20:36 +0000 |
commit | 969f12211fb141c6e7b68c662294002a177dc386 (patch) | |
tree | 81a5775900668b9147621e8405c9cd993a048a9e /src/game/g_cmds.c | |
parent | 8b42b0ff0714ff211801a7c7ec57197c1576884f (diff) |
bg_itemlist is dead. Yay
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 8c5be1a4..a79de6c8 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -235,7 +235,7 @@ void Cmd_Give_f (gentity_t *ent) if (give_all || Q_stricmp(name, "weapons") == 0) { - BG_packWeapon( (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_GRAPPLING_HOOK ) - ( 1 << WP_NONE ), ent->client->ps.stats ); + BG_packWeapon( (1 << WP_NUM_WEAPONS) - 1 - ( 1 << WP_NONE ), ent->client->ps.stats ); if (!give_all) return; } @@ -1875,6 +1875,13 @@ void Cmd_Buy_f( gentity_t *ent ) return; } + //are we /allowed/ to buy this? + if( !BG_FindPurchasableForWeapon( weapon ) ) + { + trap_SendServerCommand( ent-g_entities, va("print \"You can't buy this item\n\"" ) ); + return; + } + //add to inventory BG_packWeapon( weapon, ent->client->ps.stats ); BG_FindAmmoForWeapon( weapon, &quan, &clips, &maxClips ); |