Increase teams to 8 to match the 8 colours, fix issue #108, reenable rope length modifier
authornemo
Sun, 21 Nov 2010 13:13:42 -0500
changeset 4406 beb4de0af990
parent 4405 ed78465973f6
child 4407 cdf844ce3d48
Increase teams to 8 to match the 8 colours, fix issue #108, reenable rope length modifier
QTfrontend/game.cpp
QTfrontend/gamecfgwidget.h
hedgewars/uCommands.pas
hedgewars/uConsts.pas
hedgewars/uGears.pas
--- a/QTfrontend/game.cpp	Sun Nov 21 12:11:50 2010 -0500
+++ b/QTfrontend/game.cpp	Sun Nov 21 13:13:42 2010 -0500
@@ -88,7 +88,7 @@
             HWProto::addStringToBuffer(buf, QString("eammprob %1").arg(ammostr.mid(cAmmoNumber, cAmmoNumber)));
             HWProto::addStringToBuffer(buf, QString("eammdelay %1").arg(ammostr.mid(2 * cAmmoNumber, cAmmoNumber)));
             HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber)));
-            HWProto::addStringToBuffer(buf, QString("eammstore"));
+            if(!gamecfg->schemeData(21).toBool()) HWProto::addStringToBuffer(buf, QString("eammstore"));
             HWProto::addStringListToBuffer(buf,
                 (*it).TeamGameConfig(gamecfg->getInitHealth()));
         }
--- a/QTfrontend/gamecfgwidget.h	Sun Nov 21 12:11:50 2010 -0500
+++ b/QTfrontend/gamecfgwidget.h	Sun Nov 21 13:13:42 2010 -0500
@@ -44,6 +44,7 @@
     QComboBox * WeaponsName;
     HWMapContainer* pMapContainer;
     QTableView * tv;
+    QVariant schemeData(int column) const;
 
 public slots:
     void setParam(const QString & param, const QStringList & value);
@@ -74,7 +75,6 @@
 
     void setNetAmmo(const QString& name, const QString& ammo);
 
-    QVariant schemeData(int column) const;
 };
 
 #endif // GAMECONFIGWIDGET_H
--- a/hedgewars/uCommands.pas	Sun Nov 21 12:11:50 2010 -0500
+++ b/hedgewars/uCommands.pas	Sun Nov 21 13:13:42 2010 -0500
@@ -146,6 +146,7 @@
     RegisterVariable('waterrise', vtLongInt, @cWaterRise    , false);
     RegisterVariable('healthdec', vtLongInt, @cHealthDecrease, false);
     RegisterVariable('damagepct',vtLongInt, @cDamagePercent , false);
+    RegisterVariable('ropepct' , vtLongInt, @cRopePercent   , false);
     RegisterVariable('minedudpct',vtLongInt,@cMineDudPercent, false);
     RegisterVariable('minesnum', vtLongInt, @cLandMines     , false);
     RegisterVariable('explosives',vtLongInt,@cExplosives    , false);
@@ -214,4 +215,4 @@
     end;
 end;
 
-end.
\ No newline at end of file
+end.
--- a/hedgewars/uConsts.pas	Sun Nov 21 12:11:50 2010 -0500
+++ b/hedgewars/uConsts.pas	Sun Nov 21 13:13:42 2010 -0500
@@ -124,7 +124,7 @@
 
     cTransparentColor: Longword = $00000000;
 
-    cMaxTeams        = 6;
+    cMaxTeams        = 8;
     cMaxHHIndex      = 7;
     cMaxHHs          = 48;
     cMaxSpawnPoints  = 1024;
--- a/hedgewars/uGears.pas	Sun Nov 21 12:11:50 2010 -0500
+++ b/hedgewars/uGears.pas	Sun Nov 21 13:13:42 2010 -0500
@@ -273,7 +273,7 @@
                 end;
         gtRope: begin
                 gear^.Radius:= 3;
-                gear^.Friction:= _450;
+                gear^.Friction:= _450 * _0_01 * cRopePercent;
                 RopePoints.Count:= 0;
                 end;
         gtMine: begin