mirror of
https://github.com/glest/glest-source.git
synced 2025-08-31 11:41:46 +02:00
Removed max selection count
This commit is contained in:
@@ -63,7 +63,8 @@ namespace Glest {
|
||||
}
|
||||
|
||||
void Display::setUpImage(int i, const Texture2D *image) {
|
||||
if (i >= upCellCount) throw megaglest_runtime_error("i>=upCellCount in Display::setUpImage");
|
||||
if (i >= upCellCount)
|
||||
return;
|
||||
upImages[i] = image;
|
||||
calculateUpDimensions(i);
|
||||
}
|
||||
|
@@ -54,10 +54,6 @@ namespace Glest {
|
||||
|
||||
bool Selection::select(Unit *unit, bool addToSelection) {
|
||||
bool result = false;
|
||||
if ((int) selectedUnits.size() >= Config::getInstance().getInt("MaxUnitSelectCount", intToStr(maxUnits).c_str())) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// Fix Bug reported on sourceforge.net: Glest::Game::Selection::select crash with NULL pointer - ID: 3608835
|
||||
if (unit != NULL) {
|
||||
//check if already selected
|
||||
@@ -261,8 +257,6 @@ namespace Glest {
|
||||
throw megaglest_runtime_error("Invalid value for groupIndex = " + intToStr(groupIndex));
|
||||
}
|
||||
bool alreadyExists = false;
|
||||
bool groupIsFull = (int) groups[groupIndex].size() >= Config::getInstance().getInt("MaxUnitSelectCount", intToStr(maxUnits).c_str());
|
||||
|
||||
for (int i = 0; i < (int) groups[groupIndex].size(); ++i) {
|
||||
if (groups[groupIndex][i] == unit) {
|
||||
alreadyExists = true;
|
||||
@@ -302,7 +296,7 @@ namespace Glest {
|
||||
}
|
||||
}
|
||||
|
||||
if (unit != NULL && !groupIsFull) {
|
||||
if (unit != NULL) {
|
||||
groups[groupIndex].push_back(unit);
|
||||
return true;
|
||||
} else {
|
||||
|
@@ -49,7 +49,6 @@ namespace Glest {
|
||||
|
||||
public:
|
||||
static const int maxGroups = 10;
|
||||
static const int maxUnits = 36;
|
||||
|
||||
private:
|
||||
int factionIndex;
|
||||
|
Reference in New Issue
Block a user