summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-09-03 04:44:27 +0000
committerTim Angus <tim@ngus.net>2003-09-03 04:44:27 +0000
commit196414d90900f25d5ff45b3deb52b8e66a48bf0d (patch)
treee5c64775f827b815fc75bfc0889929459fc8ff3d /src/game/g_cmds.c
parentde1926a8b4477c79746e9e1aa0a67e47244502e5 (diff)
* Ditched the Bank and Floatmine
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c127
1 files changed, 0 insertions, 127 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 20952094..9c2c7143 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1571,129 +1571,6 @@ void Cmd_Sell_f( gentity_t *ent )
ClientUserinfoChanged( ent->client->ps.clientNum );
}
-/*
-=================
-Cmd_Deposit_f
-=================
-*/
-void Cmd_Deposit_f( gentity_t *ent )
-{
- char s[ MAX_TOKEN_CHARS ];
- int amount;
- vec3_t distance;
- int i;
- gentity_t *bankEntity;
- qboolean nearBank = qfalse;
-
- trap_Argv( 1, s, sizeof( s ) );
-
- if( ent->client->pers.teamSelection == PTE_HUMANS )
- {
- for ( i = 1, bankEntity = g_entities + i; i < level.num_entities; i++, bankEntity++ )
- {
- if( bankEntity->s.eType != ET_BUILDABLE )
- continue;
-
- if( bankEntity->s.modelindex == BA_H_BANK && bankEntity->spawned )
- {
- VectorSubtract( ent->s.pos.trBase, bankEntity->s.origin, distance );
- if( VectorLength( distance ) <= 100 )
- nearBank = qtrue;
- }
- }
-
- if( !Q_stricmp( s, "all" ) )
- amount = (short)ent->client->ps.persistant[ PERS_CREDIT ];
- else
- amount = atoi( s );
-
- //no Bank nearby
- if( !nearBank )
- {
- trap_SendServerCommand( ent-g_entities, va( "print \"You must be near an Bank\n\"" ) );
- return;
- }
-
- G_LogPrintf( "Client %d depositing %d with credit %d\n",
- ent->client->ps.clientNum,
- amount,
- (short)ent->client->ps.persistant[ PERS_CREDIT ] );
-
- if( amount <= (short)ent->client->ps.persistant[ PERS_CREDIT ] )
- {
- ent->client->ps.persistant[ PERS_CREDIT ] -= (short)amount;
- ent->client->ps.persistant[ PERS_BANK ] += amount;
- level.bankCredits[ ent->client->ps.clientNum ] += amount;
- }
- else
- G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOFUNDS );
- }
- else
- trap_SendServerCommand( ent-g_entities, va( "print \"Aliens have no bank\n\"" ) );
-}
-
-
-/*
-=================
-Cmd_Withdraw_f
-=================
-*/
-void Cmd_Withdraw_f( gentity_t *ent )
-{
- char s[ MAX_TOKEN_CHARS ];
- int amount;
- vec3_t distance;
- int i;
- gentity_t *bankEntity;
- qboolean nearBank = qfalse;
-
- trap_Argv( 1, s, sizeof( s ) );
-
- if( ent->client->pers.teamSelection == PTE_HUMANS )
- {
- for ( i = 1, bankEntity = g_entities + i; i < level.num_entities; i++, bankEntity++ )
- {
- if( bankEntity->s.eType != ET_BUILDABLE )
- continue;
-
- if( bankEntity->s.modelindex == BA_H_BANK && bankEntity->spawned )
- {
- VectorSubtract( ent->s.pos.trBase, bankEntity->s.origin, distance );
- if( VectorLength( distance ) <= 100 )
- nearBank = qtrue;
- }
- }
-
- if( !Q_stricmp( s, "all" ) )
- amount = level.bankCredits[ ent->client->ps.clientNum ];
- else
- amount = atoi( s );
-
- //no Bank nearby
- if( !nearBank )
- {
- trap_SendServerCommand( ent-g_entities, va( "print \"You must be near an Bank\n\"" ) );
- return;
- }
-
- G_LogPrintf( "Client %d withdrawing %d with credit %d\n",
- ent->client->ps.clientNum,
- amount,
- (short)level.bankCredits[ ent->client->ps.clientNum ] );
-
- if( amount <= level.bankCredits[ ent->client->ps.clientNum ] )
- {
- ent->client->ps.persistant[ PERS_CREDIT ] += (short)amount;
- ent->client->ps.persistant[ PERS_BANK ] -= amount;
- level.bankCredits[ ent->client->ps.clientNum ] -= amount;
- }
- else
- G_TriggerMenu( ent->client->ps.clientNum, MN_H_NOFUNDS );
- }
- else
- trap_SendServerCommand( ent-g_entities, va( "print \"Aliens have no bank\n\"" ) );
-}
-
/*
=================
@@ -1927,10 +1804,6 @@ void ClientCommand( int clientNum )
Cmd_Buy_f( ent );
else if( Q_stricmp( cmd, "sell" ) == 0 )
Cmd_Sell_f( ent );
- else if( Q_stricmp( cmd, "deposit" ) == 0 )
- Cmd_Deposit_f( ent );
- else if( Q_stricmp( cmd, "withdraw" ) == 0 )
- Cmd_Withdraw_f( ent );
else if( Q_stricmp( cmd, "itemact" ) == 0 )
Cmd_ActivateItem_f( ent );
else if( Q_stricmp( cmd, "itemdeact" ) == 0 )