Fixed Melee menu timeouts after Load team and NET dialogs; bug #1067
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3262 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
Changes towards version 0.7:
|
Changes towards version 0.7:
|
||||||
|
- Fixed Melee menu timeout when both sides are Cyborgs (bug #1067) - Alex
|
||||||
- Fixed AI ship not moving on warp in (bug #648) - Alex
|
- Fixed AI ship not moving on warp in (bug #648) - Alex
|
||||||
- Revert gfx settings entirely when a mode switch fails (bug #1056) - Alex
|
- Revert gfx settings entirely when a mode switch fails (bug #1056) - Alex
|
||||||
- Fixed the Syreen lights-out scene timing (bug #1011) - Alex
|
- Fixed the Syreen lights-out scene timing (bug #1011) - Alex
|
||||||
|
|||||||
@@ -365,6 +365,7 @@ DoLoadTeam (MELEE_STATE *pMS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pMS->InputFunc = DoMelee;
|
pMS->InputFunc = DoMelee;
|
||||||
|
pMS->LastInputTime = GetTimeCounter ();
|
||||||
{
|
{
|
||||||
RECT r;
|
RECT r;
|
||||||
|
|
||||||
|
|||||||
+9
-8
@@ -188,7 +188,6 @@ FRAME MeleeFrame;
|
|||||||
// Loaded from melee/melebkgd.ani
|
// Loaded from melee/melebkgd.ani
|
||||||
static FRAME BuildPickFrame;
|
static FRAME BuildPickFrame;
|
||||||
// Constructed.
|
// Constructed.
|
||||||
DWORD LastInputTime;
|
|
||||||
MELEE_STATE *pMeleeState;
|
MELEE_STATE *pMeleeState;
|
||||||
|
|
||||||
BOOLEAN DoMelee (MELEE_STATE *pMS);
|
BOOLEAN DoMelee (MELEE_STATE *pMS);
|
||||||
@@ -1086,7 +1085,7 @@ DoEdit (MELEE_STATE *pMS)
|
|||||||
pMS->MeleeOption = START_MELEE;
|
pMS->MeleeOption = START_MELEE;
|
||||||
pMS->InputFunc = DoMelee;
|
pMS->InputFunc = DoMelee;
|
||||||
UnlockMutex (GraphicsLock);
|
UnlockMutex (GraphicsLock);
|
||||||
LastInputTime = GetTimeCounter ();
|
pMS->LastInputTime = GetTimeCounter ();
|
||||||
}
|
}
|
||||||
else if (pMS->row < NUM_MELEE_ROWS
|
else if (pMS->row < NUM_MELEE_ROWS
|
||||||
&& (PulsedInputState.menu[KEY_MENU_SELECT] ||
|
&& (PulsedInputState.menu[KEY_MENU_SELECT] ||
|
||||||
@@ -1936,6 +1935,7 @@ DoConnectingDialog (MELEE_STATE *pMS)
|
|||||||
}
|
}
|
||||||
RedrawMeleeFrame ();
|
RedrawMeleeFrame ();
|
||||||
pMS->InputFunc = DoMelee;
|
pMS->InputFunc = DoMelee;
|
||||||
|
pMS->LastInputTime = GetTimeCounter ();
|
||||||
if (!pMS->flash_task)
|
if (!pMS->flash_task)
|
||||||
{
|
{
|
||||||
pMS->flash_task = AssignTask (flash_selection_func, 2048,
|
pMS->flash_task = AssignTask (flash_selection_func, 2048,
|
||||||
@@ -1962,6 +1962,7 @@ DoConnectingDialog (MELEE_STATE *pMS)
|
|||||||
|
|
||||||
UpdateMeleeStatusMessage (which_side);
|
UpdateMeleeStatusMessage (which_side);
|
||||||
pMS->InputFunc = DoMelee;
|
pMS->InputFunc = DoMelee;
|
||||||
|
pMS->LastInputTime = GetTimeCounter ();
|
||||||
Deselect (pMS->MeleeOption);
|
Deselect (pMS->MeleeOption);
|
||||||
pMS->MeleeOption = START_MELEE;
|
pMS->MeleeOption = START_MELEE;
|
||||||
if (!pMS->flash_task)
|
if (!pMS->flash_task)
|
||||||
@@ -2073,7 +2074,6 @@ MeleeOptionSelect (MELEE_STATE *pMS)
|
|||||||
pMS->Initialized = FALSE;
|
pMS->Initialized = FALSE;
|
||||||
pMS->side = pMS->MeleeOption == LOAD_TOP ? 0 : 1;
|
pMS->side = pMS->MeleeOption == LOAD_TOP ? 0 : 1;
|
||||||
DoLoadTeam (pMS);
|
DoLoadTeam (pMS);
|
||||||
LastInputTime = GetTimeCounter ();
|
|
||||||
break;
|
break;
|
||||||
case SAVE_TOP:
|
case SAVE_TOP:
|
||||||
case SAVE_BOT:
|
case SAVE_BOT:
|
||||||
@@ -2102,6 +2102,7 @@ MeleeOptionSelect (MELEE_STATE *pMS)
|
|||||||
which_side = pMS->MeleeOption == NET_TOP ? 1 : 0;
|
which_side = pMS->MeleeOption == NET_TOP ? 1 : 0;
|
||||||
confirmed = MeleeConnectDialog (which_side);
|
confirmed = MeleeConnectDialog (which_side);
|
||||||
RedrawMeleeFrame ();
|
RedrawMeleeFrame ();
|
||||||
|
pMS->LastInputTime = GetTimeCounter ();
|
||||||
if (confirmed)
|
if (confirmed)
|
||||||
{
|
{
|
||||||
pMS->Initialized = FALSE;
|
pMS->Initialized = FALSE;
|
||||||
@@ -2163,7 +2164,7 @@ DoMelee (MELEE_STATE *pMS)
|
|||||||
|
|
||||||
XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2);
|
XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 2);
|
||||||
}
|
}
|
||||||
LastInputTime = GetTimeCounter ();
|
pMS->LastInputTime = GetTimeCounter ();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2176,7 +2177,7 @@ DoMelee (MELEE_STATE *pMS)
|
|||||||
{
|
{
|
||||||
// Start editing the teams.
|
// Start editing the teams.
|
||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
LastInputTime = GetTimeCounter ();
|
pMS->LastInputTime = GetTimeCounter ();
|
||||||
Deselect (pMS->MeleeOption);
|
Deselect (pMS->MeleeOption);
|
||||||
UnlockMutex (GraphicsLock);
|
UnlockMutex (GraphicsLock);
|
||||||
pMS->MeleeOption = EDIT_MELEE;
|
pMS->MeleeOption = EDIT_MELEE;
|
||||||
@@ -2202,17 +2203,17 @@ DoMelee (MELEE_STATE *pMS)
|
|||||||
NewMeleeOption = pMS->MeleeOption;
|
NewMeleeOption = pMS->MeleeOption;
|
||||||
if (PulsedInputState.menu[KEY_MENU_UP])
|
if (PulsedInputState.menu[KEY_MENU_UP])
|
||||||
{
|
{
|
||||||
LastInputTime = GetTimeCounter ();
|
pMS->LastInputTime = GetTimeCounter ();
|
||||||
NewMeleeOption = MeleeOptionUp (pMS->MeleeOption);
|
NewMeleeOption = MeleeOptionUp (pMS->MeleeOption);
|
||||||
}
|
}
|
||||||
else if (PulsedInputState.menu[KEY_MENU_DOWN])
|
else if (PulsedInputState.menu[KEY_MENU_DOWN])
|
||||||
{
|
{
|
||||||
LastInputTime = GetTimeCounter ();
|
pMS->LastInputTime = GetTimeCounter ();
|
||||||
NewMeleeOption = MeleeOptionDown (pMS->MeleeOption);
|
NewMeleeOption = MeleeOptionDown (pMS->MeleeOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((PlayerControl[0] & PlayerControl[1] & PSYTRON_CONTROL)
|
if ((PlayerControl[0] & PlayerControl[1] & PSYTRON_CONTROL)
|
||||||
&& GetTimeCounter () - LastInputTime > ONE_SECOND * 10)
|
&& GetTimeCounter () - pMS->LastInputTime > ONE_SECOND * 10)
|
||||||
{
|
{
|
||||||
force_select = TRUE;
|
force_select = TRUE;
|
||||||
NewMeleeOption = START_MELEE;
|
NewMeleeOption = START_MELEE;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include "libs/gfxlib.h"
|
#include "libs/gfxlib.h"
|
||||||
#include "libs/mathlib.h"
|
#include "libs/mathlib.h"
|
||||||
#include "libs/sndlib.h"
|
#include "libs/sndlib.h"
|
||||||
|
#include "libs/timelib.h"
|
||||||
#include "libs/reslib.h"
|
#include "libs/reslib.h"
|
||||||
#include "netplay/packet.h"
|
#include "netplay/packet.h"
|
||||||
// for NetplayAbortReason and NetplayResetReason.
|
// for NetplayAbortReason and NetplayResetReason.
|
||||||
@@ -115,6 +116,7 @@ struct melee_state
|
|||||||
RandomContext *randomContext;
|
RandomContext *randomContext;
|
||||||
/* RNG state for all local random decisions, i.e. those
|
/* RNG state for all local random decisions, i.e. those
|
||||||
* decisions that are not shared among network parties. */
|
* decisions that are not shared among network parties. */
|
||||||
|
TimeCount LastInputTime;
|
||||||
|
|
||||||
MUSIC_REF hMusic;
|
MUSIC_REF hMusic;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user