diff options
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 50 |
1 files changed, 5 insertions, 45 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 3039b1ee..1f4de832 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1008,7 +1008,7 @@ void Cmd_Class_f( gentity_t *ent ) if( !tr.startsolid ) { //...check we can evolve to that class - if( numLevels && BG_FindStagesForClass( ent->client->pers.classSelection, g_alienStage.integer ) ) + if( numLevels >= 0 && BG_FindStagesForClass( ent->client->pers.classSelection, g_alienStage.integer ) ) { //remove credit ent->client->ps.persistant[ PERS_CREDIT ] -= (short)numLevels; @@ -1343,7 +1343,11 @@ void Cmd_Buy_f( gentity_t *ent ) BG_packAmmoArray( weapon, ent->client->ps.ammo, ent->client->ps.powerups, quan, clips, maxClips ); + + //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 ) ); //set build delay/pounce etc to 0 ent->client->ps.stats[ STAT_MISC ] = 0; @@ -1665,46 +1669,6 @@ void Cmd_Test_f( gentity_t *ent ) /* ================= -Cmd_AlienWin_f -================= -*/ -void Cmd_AlienWin_f( gentity_t *ent ) -{ - int i; - gentity_t *e; - - if( !CheatsOk( ent ) ) - return; - - for( i = 1, e = g_entities+i; i < level.num_entities; i++, e++ ) - { - if( e->s.modelindex == BA_H_SPAWN ) - G_Damage( e, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE ); - } -} - -/* -================= -Cmd_HumanWin_f -================= -*/ -void Cmd_HumanWin_f( gentity_t *ent ) -{ - int i; - gentity_t *e; - - if( !CheatsOk( ent ) ) - return; - - for( i = 1, e = g_entities+i; i < level.num_entities; i++, e++ ) - { - if( e->s.modelindex == BA_A_SPAWN ) - G_Damage( e, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE ); - } -} - -/* -================= ClientCommand ================= */ @@ -1800,10 +1764,6 @@ void ClientCommand( int clientNum ) Cmd_SetViewpos_f( ent ); else if( Q_stricmp( cmd, "test" ) == 0 ) Cmd_Test_f( ent ); - else if( Q_stricmp( cmd, "alienWin" ) == 0 ) - Cmd_AlienWin_f( ent ); - else if( Q_stricmp( cmd, "humanWin" ) == 0 ) - Cmd_HumanWin_f( ent ); else trap_SendServerCommand( clientNum, va( "print \"unknown cmd %s\n\"", cmd ) ); } |