diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_cmds.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index f091ff48..f5e78069 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1383,6 +1383,9 @@ void Cmd_ActivateItem_f( gentity_t *ent ) if( ent->client->pers.teamSelection != PTE_HUMANS ) return; + if( ent->client->pers.classSelection == PCL_NONE ) + return; + if( upgrade != UP_NONE && BG_InventoryContainsUpgrade( upgrade, ent->client->ps.stats ) ) BG_ActivateUpgrade( upgrade, ent->client->ps.stats ); else if( weapon != WP_NONE && BG_InventoryContainsWeapon( weapon, ent->client->ps.stats ) ) @@ -1410,6 +1413,9 @@ void Cmd_DeActivateItem_f( gentity_t *ent ) if( ent->client->pers.teamSelection != PTE_HUMANS ) return; + if( ent->client->pers.classSelection == PCL_NONE ) + return; + if( BG_InventoryContainsUpgrade( upgrade, ent->client->ps.stats ) ) BG_DeactivateUpgrade( upgrade, ent->client->ps.stats ); else |