Allow pushing of A button to skip full server search

This commit is contained in:
Simon 2022-03-13 09:57:05 +00:00
parent 1727aae218
commit e3ec4191f7
2 changed files with 8 additions and 2 deletions

View file

@ -422,7 +422,7 @@ static void ArenaServers_UpdateMenu( void ) {
if( g_arenaservers.refreshservers && ( g_arenaservers.currentping <= g_arenaservers.numqueriedservers ) ) {
// show progress
Com_sprintf( g_arenaservers.status.string, MAX_STATUSLENGTH, "%d of %d Arena Servers.", g_arenaservers.currentping, g_arenaservers.numqueriedservers);
g_arenaservers.statusbar.string = "Press SPACE to stop";
g_arenaservers.statusbar.string = "Press A button to stop";
qsort( g_arenaservers.serverlist, *g_arenaservers.numservers, sizeof( servernode_t ), ArenaServers_Compare);
}
else {
@ -450,7 +450,7 @@ static void ArenaServers_UpdateMenu( void ) {
// no servers found
if( g_arenaservers.refreshservers ) {
strcpy( g_arenaservers.status.string,"Scanning For Servers." );
g_arenaservers.statusbar.string = "Press SPACE to stop";
g_arenaservers.statusbar.string = "Press A button to stop";
// disable controls during refresh
g_arenaservers.gametype.generic.flags |= QMF_GRAYED;

View file

@ -256,6 +256,12 @@ static void IN_SendButtonAction(const char* action, qboolean pressed)
{
vr.weapon_stabilised = pressed;
}
//Special case for moveup as we can send a space key instead allowing us to skip
//server search in the server menu
else if (strcmp(action, "+moveup") == 0)
{
Com_QueueEvent(in_vrEventTime, SE_KEY, K_SPACE, pressed, 0, NULL);
}
else if (strcmp(action, "+weapon_select") == 0)
{
vr.weapon_select = pressed;