Fixed bug #233900: Train new units in pause mode didn't work.
This commit is contained in:
parent
37a12308d1
commit
2a822b0d22
3 changed files with 12 additions and 10 deletions
|
@ -1101,6 +1101,8 @@
|
|||
<LI>Fixed "make buildit" (from Nehal Mistry).
|
||||
<LI>Fixed crash when middle clicking in a menu (from Nehal Mistry).
|
||||
<LI>Fixed crash on BSD (from Jimmy Salmon and ppl).
|
||||
<LI>Fixed bug #233900: Train new units in pause mode didn't work.
|
||||
(from Russell Smith).
|
||||
<LI>+++
|
||||
</UL>
|
||||
</UL>
|
||||
|
|
|
@ -1068,12 +1068,12 @@ local int InputKey(int key)
|
|||
switch (key) {
|
||||
case '\r':
|
||||
if (Input[0] == '(') {
|
||||
if (!GameObserve) {
|
||||
if (!GameObserve && !GamePaused) {
|
||||
CommandLog("input", NoUnitP,FlushCommands,-1,-1,NoUnitP,Input,-1);
|
||||
CclCommand(Input);
|
||||
}
|
||||
} else if (NetworkFildes==-1) {
|
||||
if (!GameObserve) {
|
||||
if (!GameObserve && !GamePaused) {
|
||||
int ret;
|
||||
ret = HandleCheats(Input);
|
||||
if (ret) {
|
||||
|
@ -1259,7 +1259,7 @@ global void HandleKeyDown(unsigned key,unsigned keychar)
|
|||
// If no modifier look if button bound
|
||||
if( !(KeyModifiers&(ModifierControl|ModifierAlt
|
||||
|ModifierSuper|ModifierHyper)) ) {
|
||||
if( !GameObserve ) {
|
||||
if( !GameObserve && !GamePaused ) {
|
||||
if( DoButtonPanelKey(key) ) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1315,7 +1315,7 @@ global void UIHandleButtonDown(unsigned button)
|
|||
// Selecting target. (Move,Attack,Patrol,... commands);
|
||||
//
|
||||
if( CursorState==CursorStateSelect ) {
|
||||
if( !GameObserve ) {
|
||||
if( !GameObserve && !GamePaused ) {
|
||||
UISelectStateButtonDown(button);
|
||||
}
|
||||
return;
|
||||
|
@ -1385,7 +1385,7 @@ global void UIHandleButtonDown(unsigned button)
|
|||
DebugLevel3("Cursor middle down %d,%d\n" _C_ CursorX _C_ CursorY);
|
||||
MustRedraw|=RedrawCursor;
|
||||
} else if( MouseButtons&RightButton ) {
|
||||
if( !GameObserve ) {
|
||||
if( !GameObserve && !GamePaused ) {
|
||||
Unit* unit;
|
||||
// FIXME: Rethink the complete chaos of coordinates here
|
||||
// FIXME: Johns: Perhaps we should use a pixel map coordinates
|
||||
|
@ -1423,7 +1423,7 @@ global void UIHandleButtonDown(unsigned button)
|
|||
ViewportCenterViewpoint(TheUI.SelectedViewport,
|
||||
ScreenMinimap2MapX(CursorX), ScreenMinimap2MapY(CursorY));
|
||||
} else if( MouseButtons&RightButton ) {
|
||||
if( !GameObserve ) {
|
||||
if( !GameObserve && !GamePaused ) {
|
||||
MakeLocalMissile(MissileTypeGreenCross
|
||||
,ScreenMinimap2MapX(CursorX)*TileSizeX+TileSizeX/2
|
||||
,ScreenMinimap2MapY(CursorY)*TileSizeY+TileSizeY/2,0,0);
|
||||
|
@ -1440,7 +1440,7 @@ global void UIHandleButtonDown(unsigned button)
|
|||
// clicked on info panel - selection shown
|
||||
//
|
||||
if( NumSelected>1 && ButtonUnderCursor && ButtonUnderCursor<10 ) {
|
||||
if( !GameObserve ) {
|
||||
if( !GameObserve && !GamePaused ) {
|
||||
DoSelectionButtons(ButtonUnderCursor-1,button);
|
||||
}
|
||||
} else if( (MouseButtons&LeftButton) ) {
|
||||
|
@ -1464,7 +1464,7 @@ global void UIHandleButtonDown(unsigned button)
|
|||
//
|
||||
} else if( ButtonUnderCursor>3 && ButtonUnderCursor<10 ) {
|
||||
if( NumSelected==1 && Selected[0]->Type->Transporter ) {
|
||||
if( !GameObserve ) {
|
||||
if( !GameObserve && !GamePaused ) {
|
||||
if( Selected[0]->OnBoard[ButtonUnderCursor-4] ) {
|
||||
// FIXME: should check if valid here.
|
||||
SendCommandUnload(Selected[0]
|
||||
|
@ -1476,7 +1476,7 @@ global void UIHandleButtonDown(unsigned button)
|
|||
}
|
||||
else if( NumSelected==1 && Selected[0]->Type->Building &&
|
||||
Selected[0]->Orders[0].Action==UnitActionTrain) {
|
||||
if( !GameObserve ) {
|
||||
if( !GameObserve && !GamePaused ) {
|
||||
int slotid = ButtonUnderCursor-4;
|
||||
if ( Selected[0]->Data.Train.Count == 1 ) {
|
||||
// FIXME: ignore clicks that did not hit
|
||||
|
@ -1499,7 +1499,7 @@ global void UIHandleButtonDown(unsigned button)
|
|||
// clicked on button panel
|
||||
//
|
||||
} else if( ButtonUnderCursor>9 ) {
|
||||
if( !GameObserve ) {
|
||||
if( !GameObserve && !GamePaused ) {
|
||||
DoButtonButtonClicked(ButtonUnderCursor-10);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue