Skip to content

Commit 8896a0b

Browse files
committed
1 parent 26d7671 commit 8896a0b

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎src/Basescape/BaseInfoState.cpp‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,18 +346,20 @@ void BaseInfoState::init()
346346
_barDefense->setValue(_base->getDefenseValue());
347347

348348
std::wostringstream ss10;
349-
ss10 << _base->getShortRangeDetection();
349+
int shortRangeDetection = _base->getShortRangeDetection();
350+
ss10 << shortRangeDetection;
350351
_numShortRange->setText(ss10.str());
351352

352-
_barShortRange->setMax(_base->getShortRangeDetection());
353-
_barShortRange->setValue(_base->getShortRangeDetection());
353+
_barShortRange->setMax(shortRangeDetection);
354+
_barShortRange->setValue(shortRangeDetection);
354355

355356
std::wostringstream ss11;
356-
ss11 << _base->getLongRangeDetection();
357+
int longRangeDetection = _base->getLongRangeDetection();
358+
ss11 << longRangeDetection;
357359
_numLongRange->setText(ss11.str());
358360

359-
_barLongRange->setMax(_base->getLongRangeDetection());
360-
_barLongRange->setValue(_base->getLongRangeDetection());
361+
_barLongRange->setMax(longRangeDetection);
362+
_barLongRange->setValue(longRangeDetection);
361363
}
362364

363365
/**

‎src/Mod/Mod.cpp‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2216,11 +2216,9 @@ std::string Mod::getFontName() const
22162216
*/
22172217
int Mod::getMinRadarRange() const
22182218
{
2219-
static int minRadarRange = -1;
2219+
int minRadarRange = 0;
22202220

2221-
if (minRadarRange < 0)
22222221
{
2223-
minRadarRange = 0;
22242222
for (std::vector<std::string>::const_iterator i = _facilitiesIndex.begin(); i != _facilitiesIndex.end(); ++i)
22252223
{
22262224
RuleBaseFacility *f = getBaseFacility(*i);

0 commit comments

Comments
 (0)