diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_servercmds.c | 3 | ||||
-rw-r--r-- | src/ui/ui_main.c | 8 | ||||
-rw-r--r-- | src/ui/ui_shared.c | 12 |
3 files changed, 10 insertions, 13 deletions
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 6c43782a..0b562360 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -947,7 +947,8 @@ static void CG_Say( int clientNum, saymode_t mode, const char *text ) centity_t *locent; locent = CG_GetPlayerLocation( ); - locationNum = locent->currentState.generic1; + if( locent ) + locationNum = locent->currentState.generic1; } else locationNum = ci->location; diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 34fe8b98..24cb6b7c 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -3186,6 +3186,14 @@ static void UI_RunMenuScript( char **args ) uiInfo.mapList[ui_selectedMap.integer].mapLoadName ) ); } } + else if( Q_stricmp( name, "voteNextMap" ) == 0 ) + { + if( ui_selectedMap.integer >= 0 && ui_selectedMap.integer < uiInfo.mapCount ) + { + trap_Cmd_ExecuteText( EXEC_APPEND, va( "callvote nextmap %s\n", + uiInfo.mapList[ui_selectedMap.integer].mapLoadName ) ); + } + } else if( Q_stricmp( name, "voteKick" ) == 0 ) { if( uiInfo.playerIndex >= 0 && uiInfo.playerIndex < uiInfo.playerCount ) diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c index d5ed79dc..524df189 100644 --- a/src/ui/ui_shared.c +++ b/src/ui/ui_shared.c @@ -3449,21 +3449,10 @@ qboolean Item_TextField_HandleKey( itemDef_t *item, int key ) if( newItem && ( newItem->type == ITEM_TYPE_EDITFIELD || newItem->type == ITEM_TYPE_NUMERICFIELD ) ) g_editItem = newItem; - else - { - releaseFocus = qtrue; - goto exit; - } - break; case K_ENTER: case K_KP_ENTER: - case K_ESCAPE: - case K_MOUSE1: - case K_MOUSE2: - case K_MOUSE3: - case K_MOUSE4: releaseFocus = qtrue; goto exit; @@ -4017,7 +4006,6 @@ void Menu_HandleKey( menuDef_t *menu, int key, qboolean down ) else if( key == K_MOUSE1 || key == K_MOUSE2 || key == K_MOUSE3 ) { g_editingField = qfalse; - Item_RunScript( g_editItem, g_editItem->onTextEntry ); g_editItem = NULL; Display_MouseMove( NULL, DC->cursorx, DC->cursory ); } |