summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2002-08-06 01:48:44 +0000
committerTim Angus <tim@ngus.net>2002-08-06 01:48:44 +0000
commit2d7417adb3c8588b04261d73f1188d9b50b66700 (patch)
treefe3ece71f817ec317e4ffe2e43dc6a81addc71cb /src
parente146443136664001d1da990acfebdf42e90f988d (diff)
* Bank menu code support
Diffstat (limited to 'src')
-rw-r--r--src/game/g_cmds.c2
-rw-r--r--src/ui/ui_local.h2
-rw-r--r--src/ui/ui_main.c11
3 files changed, 14 insertions, 1 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index c4c63f2d..a58b57ca 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -2284,7 +2284,7 @@ void Cmd_Withdraw_f( gentity_t *ent )
level.bankCredits[ ent->client->ps.clientNum ] -= amount;
}
else
- G_AddPredictableEvent( ent, EV_MENU, MN_H_NOFUNDS );
+ G_AddPredictableEvent( ent, EV_MENU, MN_A_NOFUNDS );
}
}
diff --git a/src/ui/ui_local.h b/src/ui/ui_local.h
index e8063f9b..966df267 100644
--- a/src/ui/ui_local.h
+++ b/src/ui/ui_local.h
@@ -125,6 +125,8 @@ extern vmCvar_t ui_smallFont;
extern vmCvar_t ui_bigFont;
extern vmCvar_t ui_serverStatusTimeOut;
+//TA: bank values
+extern vmCvar_t ui_bank;
//
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index d1c1dd50..350df126 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -4221,6 +4221,12 @@ static void UI_RunMenuScript(char **args) {
if( cmd = uiInfo.tremHumanBuildList[ uiInfo.tremHumanBuildIndex ].cmd )
trap_Cmd_ExecuteText( EXEC_APPEND, cmd );
}
+ else if( Q_stricmp( name, "SetBankDefaults" ) == 0 )
+ trap_Cvar_Set( "ui_bank", "0" );
+ else if( Q_stricmp( name, "BankDeposit" ) == 0 )
+ trap_Cmd_ExecuteText( EXEC_APPEND, va( "cmd deposit %d", (int)trap_Cvar_VariableValue( "ui_bank" ) ) );
+ else if( Q_stricmp( name, "BankWithdraw" ) == 0 )
+ trap_Cmd_ExecuteText( EXEC_APPEND, va( "cmd withdraw %d", (int)trap_Cvar_VariableValue( "ui_bank" ) ) );
//TA: tremulous menus
else if (Q_stricmp(name, "playMovie") == 0) {
@@ -6665,6 +6671,9 @@ vmCvar_t ui_realCaptureLimit;
vmCvar_t ui_realWarmUp;
vmCvar_t ui_serverStatusTimeOut;
+//TA: bank values
+vmCvar_t ui_bank;
+
// bk001129 - made static to avoid aliasing
static cvarTable_t cvarTable[] = {
@@ -6786,6 +6795,8 @@ static cvarTable_t cvarTable[] = {
{ &ui_realWarmUp, "g_warmup", "20", CVAR_ARCHIVE},
{ &ui_realCaptureLimit, "capturelimit", "8", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART},
{ &ui_serverStatusTimeOut, "ui_serverStatusTimeOut", "7000", CVAR_ARCHIVE},
+
+ { &ui_bank, "ui_bank", "0", 0 },
};