summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui_gameinfo.c5
-rw-r--r--src/ui/ui_main.c10
-rw-r--r--src/ui/ui_shared.c23
3 files changed, 2 insertions, 36 deletions
diff --git a/src/ui/ui_gameinfo.c b/src/ui/ui_gameinfo.c
index 18a604b8..95c57c6f 100644
--- a/src/ui/ui_gameinfo.c
+++ b/src/ui/ui_gameinfo.c
@@ -169,7 +169,6 @@ void UI_LoadArenas( void )
char* dirptr;
int i, n;
int dirlen;
- char *type;
ui_numArenas = 0;
uiInfo.mapCount = 0;
@@ -193,10 +192,6 @@ void UI_LoadArenas( void )
for( n = 0; n < ui_numArenas; n++ )
{
- // determine type
- type = Info_ValueForKey( ui_arenaInfos[ n ], "type" );
- // if no type specified, it will be treated as "ffa"
-
uiInfo.mapList[uiInfo.mapCount].cinematic = -1;
uiInfo.mapList[uiInfo.mapCount].mapLoadName = String_Alloc( Info_ValueForKey( ui_arenaInfos[n], "map" ) );
uiInfo.mapList[uiInfo.mapCount].mapName = String_Alloc( Info_ValueForKey( ui_arenaInfos[n], "longname" ) );
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index eb96c4c5..73080627 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -1864,7 +1864,7 @@ UI_BuildPlayerList
static void UI_BuildPlayerList( void )
{
uiClientState_t cs;
- int n, count, team, team2, playerTeamNumber;
+ int n, count, team, team2;
char info[MAX_INFO_STRING];
trap_GetClientState( &cs );
@@ -1876,7 +1876,6 @@ static void UI_BuildPlayerList( void )
uiInfo.playerCount = 0;
uiInfo.myTeamCount = 0;
uiInfo.myPlayerIndex = 0;
- playerTeamNumber = 0;
for( n = 0; n < count; n++ )
{
@@ -1909,9 +1908,6 @@ static void UI_BuildPlayerList( void )
Q_CleanStr( uiInfo.teamNames[uiInfo.myTeamCount] );
uiInfo.teamClientNums[uiInfo.myTeamCount] = n;
- if( uiInfo.playerNumber == n )
- playerTeamNumber = uiInfo.myTeamCount;
-
uiInfo.myTeamCount++;
}
}
@@ -4009,8 +4005,6 @@ UI_Init
*/
void UI_Init( qboolean inGameLoad )
{
- int start;
-
BG_InitClassConfigs( );
BG_InitAllowedGameElements( );
@@ -4089,8 +4083,6 @@ void UI_Init( qboolean inGameLoad )
AssetCache();
- start = trap_Milliseconds();
-
UI_LoadMenus( "ui/menus.txt", qtrue );
UI_LoadMenus( "ui/ingame.txt", qfalse );
UI_LoadMenus( "ui/tremulous.txt", qfalse );
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c
index 1cd922ad..b98127ce 100644
--- a/src/ui/ui_shared.c
+++ b/src/ui/ui_shared.c
@@ -2703,9 +2703,6 @@ int Item_ListBox_OverLB( itemDef_t *item, float x, float y )
{
rectDef_t r;
int thumbstart;
- int count;
-
- count = DC->feederCount( item->feederID );
r.x = SCROLLBAR_SLIDER_X( item );
r.y = SCROLLBAR_Y( item );
@@ -3988,14 +3985,10 @@ void Menu_HandleKey( menuDef_t *menu, int key, qboolean down )
{
int i;
itemDef_t *item = NULL;
- qboolean inHandler = qfalse;
-
- inHandler = qtrue;
if( g_waitingForKey && down )
{
Item_Bind_HandleKey( g_bindItem, key, down );
- inHandler = qfalse;
return;
}
@@ -4006,7 +3999,6 @@ void Menu_HandleKey( menuDef_t *menu, int key, qboolean down )
g_editingField = qfalse;
Item_RunScript( g_editItem, g_editItem->onTextEntry );
g_editItem = NULL;
- inHandler = qfalse;
return;
}
else
@@ -4016,10 +4008,7 @@ void Menu_HandleKey( menuDef_t *menu, int key, qboolean down )
}
if( menu == NULL )
- {
- inHandler = qfalse;
return;
- }
// see if the mouse is within the window bounds and if so is this a mouse click
if( down && !( menu->window.flags & WINDOW_POPUP ) &&
@@ -4032,7 +4021,6 @@ void Menu_HandleKey( menuDef_t *menu, int key, qboolean down )
inHandleKey = qtrue;
Menus_HandleOOBClick( menu, key, down );
inHandleKey = qfalse;
- inHandler = qfalse;
return;
}
}
@@ -4054,16 +4042,12 @@ void Menu_HandleKey( menuDef_t *menu, int key, qboolean down )
if( Item_HandleKey( item, key, down ) )
{
Item_Action( item );
- inHandler = qfalse;
return;
}
}
if( !down )
- {
- inHandler = qfalse;
return;
- }
// default handling
switch( key )
@@ -4178,8 +4162,6 @@ void Menu_HandleKey( menuDef_t *menu, int key, qboolean down )
break;
}
-
- inHandler = qfalse;
}
void ToWindowCoords( float *x, float *y, windowDef_t *window )
@@ -5129,12 +5111,10 @@ void BindingFromName( const char *cvar )
void Item_Slider_Paint( itemDef_t *item )
{
vec4_t newColor;
- float x, y, value;
+ float x, y;
menuDef_t *parent = ( menuDef_t* )item->parent;
float vScale = Item_Slider_VScale( item );
- value = ( item->cvar ) ? DC->getCVarValue( item->cvar ) : 0;
-
if( item->window.flags & WINDOW_HASFOCUS )
memcpy( newColor, &parent->focusColor, sizeof( vec4_t ) );
else
@@ -5646,7 +5626,6 @@ void Item_OwnerDraw_Paint( itemDef_t *item )
if( DC->ownerDrawItem )
{
vec4_t color, lowLight;
- menuDef_t *parent = ( menuDef_t* )item->parent;
Fade( &item->window.flags, &item->window.foreColor[3], parent->fadeClamp, &item->window.nextTime,
parent->fadeCycle, qtrue, parent->fadeAmount );
memcpy( &color, &item->window.foreColor, sizeof( color ) );