From a0f58ba3c293256786e6260527554ef0fdeffd62 Mon Sep 17 00:00:00 2001 From: avolkov Date: Wed, 18 Jan 2006 05:00:07 +0000 Subject: [PATCH] Fixed quasispace search and leftover text bugs in star search git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2189 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/planets/pstarmap.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/sc2/src/sc2code/planets/pstarmap.c b/sc2/src/sc2code/planets/pstarmap.c index 88a46a0fd..6147805e7 100644 --- a/sc2/src/sc2code/planets/pstarmap.c +++ b/sc2/src/sc2code/planets/pstarmap.c @@ -1145,17 +1145,27 @@ DoMoveCursor (PMENU_STATE pMS) } else if (PulsedInputState.key[KEY_MENU_SEARCH]) { - POINT oldpt = pMS->first_item; + if (GET_GAME_STATE (ARILOU_SPACE_SIDE) <= 1) + { // HyperSpace search + POINT oldpt = pMS->first_item; - if (!DoStarSearch (pMS)) - { // search failed or canceled - return cursor - UpdateCursorLocation (pMS, 0, 0, &oldpt); + if (!DoStarSearch (pMS)) + { // search failed or canceled - return cursor + UpdateCursorLocation (pMS, 0, 0, &oldpt); + } + // make sure cmp fails + strcpy (last_buf, " "); + UpdateCursorInfo (pMS, last_buf); + + SetMenuRepeatDelay (MIN_ACCEL_DELAY, MAX_ACCEL_DELAY, + STEP_ACCEL_DELAY, TRUE); + SetMenuSounds (MENU_SOUND_NONE, MENU_SOUND_NONE); + } + else + { // no search in QuasiSpace + PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 2), + 0, NotPositional (), NULL, 0); } - last_buf[0] = '\0'; - UpdateCursorInfo (pMS, last_buf); - - SetMenuRepeatDelay (MIN_ACCEL_DELAY, MAX_ACCEL_DELAY, STEP_ACCEL_DELAY, TRUE); - SetMenuSounds (MENU_SOUND_NONE, MENU_SOUND_NONE); } else {