summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_event.c16
-rw-r--r--src/game/g_cmds.c8
-rw-r--r--src/ui/ui_main.c6
3 files changed, 19 insertions, 11 deletions
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c
index abf703e3..1d30e416 100644
--- a/src/cgame/cg_event.c
+++ b/src/cgame/cg_event.c
@@ -336,14 +336,14 @@ void CG_Menu( int eventParm )
switch( eventParm )
{
- case MN_TEAM: trap_SendConsoleCommand( "menu tremulous_teamselect\n" ); break;
- case MN_A_CLASS: trap_SendConsoleCommand( "menu tremulous_alienclass\n" ); break;
- case MN_H_SPAWN: trap_SendConsoleCommand( "menu tremulous_humanitem\n" ); break;
- case MN_A_BUILD: trap_SendConsoleCommand( "menu tremulous_alienbuild\n" ); break;
- case MN_H_BUILD: trap_SendConsoleCommand( "menu tremulous_humanbuild\n" ); break;
- case MN_H_ARMOURY: trap_SendConsoleCommand( "menu tremulous_humanarmoury\n" ); break;
- case MN_H_BANK: trap_SendConsoleCommand( "menu tremulous_humanbank\n" ); break;
- case MN_A_OBANK: trap_SendConsoleCommand( "menu tremulous_alienbank\n" ); break;
+ case MN_TEAM: trap_SendConsoleCommand( "menu tremulous_teamselect\n" ); break;
+ case MN_A_CLASS: trap_SendConsoleCommand( "menu tremulous_alienclass\n" ); break;
+ case MN_H_SPAWN: trap_SendConsoleCommand( "menu tremulous_humanitem\n" ); break;
+ case MN_A_BUILD: trap_SendConsoleCommand( "menu tremulous_alienbuild\n" ); break;
+ case MN_H_BUILD: trap_SendConsoleCommand( "menu tremulous_humanbuild\n" ); break;
+ case MN_H_ARMOURY: trap_SendConsoleCommand( "menu tremulous_humanarmoury\n" ); break;
+ case MN_H_BANK: trap_SendConsoleCommand( "menu tremulous_humanbank\n" ); break;
+ case MN_A_OBANK: trap_SendConsoleCommand( "menu tremulous_alienbank\n" ); break;
case MN_H_NOROOM:
trap_Cvar_Set( "ui_dialog", "There is no room to build here. Move until the buildable turns "
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 47163acc..c197bdaa 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1434,7 +1434,10 @@ void Cmd_Buy_f( gentity_t *ent )
//if the buyer previously had no items at all, force a new selection
if( numItems == 0 )
- G_AddEvent( ent, EV_NEXT_WEAPON, 0 );
+ G_AddPredictableEvent( ent, EV_NEXT_WEAPON, 0 );
+
+ //retrigger the armoury menu
+ G_AddPredictableEvent( ent, EV_MENU, MN_H_ARMOURY );
//update ClientInfo
ClientUserinfoChanged( ent->client->ps.clientNum );
@@ -1518,6 +1521,9 @@ void Cmd_Sell_f( gentity_t *ent )
else
trap_SendServerCommand( ent-g_entities, va( "print \"Unknown item\n\"" ) );
+ //retrigger the armoury menu
+ G_AddPredictableEvent( ent, EV_MENU, MN_H_ARMOURY );
+
//update ClientInfo
ClientUserinfoChanged( ent->client->ps.clientNum );
}
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index a48b78bc..2bfe2b18 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -3415,7 +3415,8 @@ static void UI_LoadTremHumanArmouryBuys( )
if( BG_FindTeamForWeapon( i ) == WUT_HUMANS &&
BG_FindPurchasableForWeapon( i ) &&
BG_FindStagesForWeapon( i, stage ) &&
- !( BG_FindSlotsForWeapon( i ) & slots ) )
+ !( BG_FindSlotsForWeapon( i ) & slots ) &&
+ !( weapons & ( 1 << i ) ) )
{
uiInfo.tremHumanArmouryBuyList[ j ].text =
String_Alloc( BG_FindHumanNameForWeapon( i ) );
@@ -3434,7 +3435,8 @@ static void UI_LoadTremHumanArmouryBuys( )
{
if( BG_FindTeamForUpgrade( i ) == WUT_HUMANS &&
BG_FindStagesForUpgrade( i, stage ) &&
- !( BG_FindSlotsForUpgrade( i ) & slots ) )
+ !( BG_FindSlotsForUpgrade( i ) & slots ) &&
+ !( upgrades & ( 1 << i ) ) )
{
uiInfo.tremHumanArmouryBuyList[ j ].text =
String_Alloc( BG_FindHumanNameForUpgrade( i ) );