Increase hedgehog limit to 64
authorWuzzy <Wuzzy2@mail.ru>
Wed, 18 Jul 2018 00:27:23 +0200
changeset 13510 69f0f437c75a
parent 13509 f747c385b5ba
child 13512 36f3f77e9b1b
Increase hedgehog limit to 64 8 hogs * 8 teams = 64 hogs Old limit = 48
ChangeLog.txt
QTfrontend/hwconsts.cpp.in
QTfrontend/hwform.cpp
gameServer/Consts.hs
hedgewars/uConsts.pas
--- a/ChangeLog.txt	Tue Jul 17 22:42:49 2018 +0200
+++ b/ChangeLog.txt	Wed Jul 18 00:27:23 2018 +0200
@@ -4,6 +4,7 @@
 Game:
  + Add new key to show mission panel (default: M)
  + Add chat command “/help”, displays help for chat commands
+ + Increase hedgehog limit to 64
  * Fix crash when 2 or more controllers were connected
  * Fix extreme amounts of droplets when shooting with minigun into ocean world edge
  * Fix hog being unable to walk after using sniper rifle without firing both shots
--- a/QTfrontend/hwconsts.cpp.in	Tue Jul 17 22:42:49 2018 +0200
+++ b/QTfrontend/hwconsts.cpp.in	Wed Jul 18 00:27:23 2018 +0200
@@ -43,7 +43,7 @@
 bool custom_data = false;
 
 int cMaxTeams = 8;
-int cMaxHHs = 48;
+int cMaxHHs = HEDGEHOGS_PER_TEAM * cMaxTeams;
 int cMinServerVersion = 3;
 
 QString * cDefaultAmmoStore = new QString( AMMOLINE_DEFAULT_QT AMMOLINE_DEFAULT_PROB
--- a/QTfrontend/hwform.cpp	Tue Jul 17 22:42:49 2018 +0200
+++ b/QTfrontend/hwform.cpp	Wed Jul 18 00:27:23 2018 +0200
@@ -1707,14 +1707,6 @@
 
 void HWForm::StartMPGame()
 {
-    int numHogs = ui.pageMultiplayer->teamsSelect->getNumHedgehogs();
-    /* Don't allow to start game with more than cMaxHHs hedgehogs.
-    TODO: Remove this as soon the engine supports more hedgehogs. */
-    if(numHogs > cMaxHHs)
-    {
-        MessageDialog::ShowErrorMessage(QMessageBox::tr("Sorry, there are too many hedgehogs! Please try again with fewer hedgehogs.\n\nMaximum number of hedgehogs: %1\nCurrent number of hedgehogs: %2").arg(cMaxHHs).arg(numHogs), this);
-        return;
-    }
     QString ammo;
     ammo = ui.pageMultiplayer->gameCFG->WeaponsName->itemData(
                ui.pageMultiplayer->gameCFG->WeaponsName->currentIndex()
--- a/gameServer/Consts.hs	Tue Jul 17 22:42:49 2018 +0200
+++ b/gameServer/Consts.hs	Wed Jul 18 00:27:23 2018 +0200
@@ -31,4 +31,4 @@
 cMaxTeams = 8
 
 cMaxHHs :: Int
-cMaxHHs = 48
+cMaxHHs = cHogsPerTeam * cMaxTeams
--- a/hedgewars/uConsts.pas	Tue Jul 17 22:42:49 2018 +0200
+++ b/hedgewars/uConsts.pas	Wed Jul 18 00:27:23 2018 +0200
@@ -172,7 +172,7 @@
 
     cMaxTeams        = 8;
     cMaxHHIndex      = 7;
-    cMaxHHs          = 48;
+    cMaxHHs          = cMaxTeams * (cMaxHHIndex+1);
 
     cMaxEdgePoints = 32768;