- bugfix for group key camera movement (respect different group keys being pressed)

This commit is contained in:
Mark Vejvoda
2011-06-10 16:59:19 +00:00
parent 6bb805978c
commit ba3071c15b
2 changed files with 7 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ void SelectionQuad::disable(){
Gui::Gui(){
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] START\n",__FILE__,__FUNCTION__);
lastGroupRecall = -1;
posObjWorld= Vec2i(54, 14);
validPosObjWorld= false;
activeCommandType= NULL;
@@ -313,13 +314,16 @@ void Gui::groupKey(int groupIndex) {
Config &config = Config::getInstance();
int recallGroupCenterCameraTimeout = config.getInt("RecallGroupCenterCameraTimeoutMilliseconds","1500");
if(lastGroupRecallTime.getMillis() > 0 && lastGroupRecallTime.getMillis() <= recallGroupCenterCameraTimeout) {
if(lastGroupRecall == groupIndex &&
lastGroupRecallTime.getMillis() > 0 &&
lastGroupRecallTime.getMillis() <= recallGroupCenterCameraTimeout) {
centerCameraOnSelection();
}
else {
selection.recallGroup(groupIndex);
}
lastGroupRecallTime.start();
lastGroupRecall = groupIndex;
}
}

View File

@@ -133,6 +133,8 @@ private:
int minQuadSize;
Chrono lastGroupRecallTime;
int lastGroupRecall;
//states
bool selectingBuilding;
bool selectingPos;