Allow selecting scan methods for shielded and gas giant planets with PC menus; bug #800
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2140 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -990,6 +990,15 @@ DoScan (PMENU_STATE pMS)
|
|||||||
COUNT fuel_required;
|
COUNT fuel_required;
|
||||||
UNICODE buf[20];
|
UNICODE buf[20];
|
||||||
|
|
||||||
|
if ((pSolarSysState->pOrbitalDesc->data_index & PLANET_SHIELDED)
|
||||||
|
|| (pSolarSysState->SysInfo.PlanetInfo.AtmoDensity ==
|
||||||
|
GAS_GIANT_ATMOSPHERE))
|
||||||
|
{ // cannot dispatch to shielded planets or gas giants
|
||||||
|
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 2),
|
||||||
|
0, NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
|
return (TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
fuel_required = (COUNT)(
|
fuel_required = (COUNT)(
|
||||||
pSolarSysState->SysInfo.PlanetInfo.SurfaceGravity << 1
|
pSolarSysState->SysInfo.PlanetInfo.SurfaceGravity << 1
|
||||||
);
|
);
|
||||||
@@ -1026,10 +1035,19 @@ DoScan (PMENU_STATE pMS)
|
|||||||
return PickPlanetSide (pMS);
|
return PickPlanetSide (pMS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Various scans
|
||||||
|
if (pSolarSysState->pOrbitalDesc->data_index & PLANET_SHIELDED)
|
||||||
|
{ // cannot scan shielded planets
|
||||||
|
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 2),
|
||||||
|
0, NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
|
return (TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
pSolarSysState->MenuState.Initialized += 4;
|
pSolarSysState->MenuState.Initialized += 4;
|
||||||
#ifndef SPIN_ON_SCAN
|
#ifndef SPIN_ON_SCAN
|
||||||
pSolarSysState->PauseRotate = 1;
|
pSolarSysState->PauseRotate = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
min_scan = pMS->CurState;
|
min_scan = pMS->CurState;
|
||||||
if (min_scan != AUTO_SCAN)
|
if (min_scan != AUTO_SCAN)
|
||||||
max_scan = min_scan;
|
max_scan = min_scan;
|
||||||
@@ -1165,9 +1183,10 @@ DoScan (PMENU_STATE pMS)
|
|||||||
pSolarSysState->PauseRotate = 0;
|
pSolarSysState->PauseRotate = 0;
|
||||||
FlushInput ();
|
FlushInput ();
|
||||||
}
|
}
|
||||||
else if (!(pSolarSysState->pOrbitalDesc->data_index & PLANET_SHIELDED)
|
else if (optWhichMenu == OPT_PC ||
|
||||||
|
(!(pSolarSysState->pOrbitalDesc->data_index & PLANET_SHIELDED)
|
||||||
&& pSolarSysState->SysInfo.PlanetInfo.AtmoDensity !=
|
&& pSolarSysState->SysInfo.PlanetInfo.AtmoDensity !=
|
||||||
GAS_GIANT_ATMOSPHERE)
|
GAS_GIANT_ATMOSPHERE))
|
||||||
DoMenuChooser (pMS, PM_MIN_SCAN);
|
DoMenuChooser (pMS, PM_MIN_SCAN);
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
@@ -1200,9 +1219,10 @@ ScanSystem (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pSolarSysState->pOrbitalDesc->data_index & PLANET_SHIELDED)
|
if (optWhichMenu == OPT_3DO &&
|
||||||
|
((pSolarSysState->pOrbitalDesc->data_index & PLANET_SHIELDED)
|
||||||
|| pSolarSysState->SysInfo.PlanetInfo.AtmoDensity ==
|
|| pSolarSysState->SysInfo.PlanetInfo.AtmoDensity ==
|
||||||
GAS_GIANT_ATMOSPHERE)
|
GAS_GIANT_ATMOSPHERE))
|
||||||
{
|
{
|
||||||
MenuState.CurState = EXIT_SCAN;
|
MenuState.CurState = EXIT_SCAN;
|
||||||
ScanContext = 0;
|
ScanContext = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user