diff options
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index c63eee1a..4144b28b 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1346,8 +1346,7 @@ void Cmd_Buy_f( gentity_t *ent ) //force a weapon change ent->client->ps.pm_flags |= PMF_WEAPON_SWITCH; - ent->client->ps.weapon = weapon; - trap_SendServerCommand( ent->client->ps.clientNum, va( "weaponswitch %d", weapon ) ); + trap_SendServerCommand( ent-g_entities, va( "weaponswitch %d", weapon ) ); //set build delay/pounce etc to 0 ent->client->ps.stats[ STAT_MISC ] = 0; @@ -1494,7 +1493,11 @@ void Cmd_Sell_f( gentity_t *ent ) //if we have this weapon selected, force a new selection if( weapon == ent->client->ps.weapon ) - G_AddEvent( ent, EV_NEXT_WEAPON, ent->client->ps.clientNum ); + { + //force a weapon change + ent->client->ps.pm_flags |= PMF_WEAPON_SWITCH; + trap_SendServerCommand( ent-g_entities, va( "weaponswitch %d", WP_BLASTER ) ); + } } else if( upgrade != UP_NONE ) { |