# HG changeset patch
# User unc0rr
# Date 1190318410 0
# Node ID 78a68cc4d846b0e039751a49de3d90ed42021567
# Parent f6e5f4e122dba6878d05937ee3f134315f6d0d5b
Special game mode allowing the only clan on map for training mode
diff -r f6e5f4e122db -r 78a68cc4d846 QTfrontend/game.cpp
--- a/QTfrontend/game.cpp Tue Sep 18 19:52:46 2007 +0000
+++ b/QTfrontend/game.cpp Thu Sep 20 20:00:10 2007 +0000
@@ -120,7 +120,7 @@
QByteArray teamscfg;
HWProto::addStringToBuffer(teamscfg, "TL");
HWProto::addStringToBuffer(teamscfg, "eseed none");
- HWProto::addStringToBuffer(teamscfg, "e$gmflags 0");
+ HWProto::addStringToBuffer(teamscfg, QString("e$gmflags %1").arg(0x10000000));
HWProto::addStringToBuffer(teamscfg, "e$turntime 60000");
HWProto::addStringToBuffer(teamscfg, "emap mushrooms");
HWProto::addStringToBuffer(teamscfg, "etheme avematan");
@@ -132,13 +132,6 @@
HWProto::addStringListToBuffer(teamscfg,
team1.TeamGameConfig(100));
- HWTeam team2(2);
- team2.difficulty = 4;
- team2.teamColor = QColor(16776960);
- team2.numHedgehogs = 4;
- HWProto::addStringListToBuffer(teamscfg,
- team2.TeamGameConfig(100));
-
QFile file(datadir->absolutePath() + "/Trainings/001_Shotgun.txt");
if(!file.open(QFile::ReadOnly))
{
diff -r f6e5f4e122db -r 78a68cc4d846 QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp Tue Sep 18 19:52:46 2007 +0000
+++ b/QTfrontend/hwform.cpp Thu Sep 20 20:00:10 2007 +0000
@@ -87,7 +87,6 @@
connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), config, SLOT(SaveOptions()));
connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageOptions->WeaponsButt, SIGNAL(clicked()), this, SLOT(GoToSelectWeapon()));
- // TODO
connect(ui.pageNet->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack()));
connect(ui.pageNet->BtnNetConnect, SIGNAL(clicked()), this, SLOT(NetConnect()));
diff -r f6e5f4e122db -r 78a68cc4d846 hedgewars.kdevelop
--- a/hedgewars.kdevelop Tue Sep 18 19:52:46 2007 +0000
+++ b/hedgewars.kdevelop Thu Sep 20 20:00:10 2007 +0000
@@ -6,22 +6,36 @@
1
KDevCustomProject
C++
-
+
+ kdevfilegroups
+ kdevvalgrind
+ kdevdoxygen
+ kdevregexptest
+ kdevdistpart
+ kdevscripting
+ kdevfilter
+
hedgewars
.
false
kdevsubversion
+
executable
/
- bin/hedgewars
+ /usr/home/unC0Rr/Sources/Hedgewars/Hedgewars-GNA/bin/hedgewars
false
true
+
+ /usr/home/unC0Rr/Sources/Hedgewars/Hedgewars-GNA
+ false
+ false
+ false
*.java
@@ -165,11 +179,21 @@
+
+ 0
+
+
+
+ default
+
+
+
+
-
+
@@ -245,8 +269,8 @@
3
/usr/qt/3
EmbeddedKDevDesigner
- /usr/qt/3/bin/qmake
- /usr/qt/3/bin/designer
+ /usr/local/bin/qmake-qt4
+ /usr/local/bin/designer-qt4
@@ -285,6 +309,11 @@
true
true
+
+ false
+ true
+ Vertical
+
@@ -311,7 +340,8 @@
-
-
+
+ /usr/home/unC0Rr/Sources/Hedgewars/Hedgewars-GNA/tags
+
diff -r f6e5f4e122db -r 78a68cc4d846 hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc Tue Sep 18 19:52:46 2007 +0000
+++ b/hedgewars/GSHandlers.inc Thu Sep 20 20:00:10 2007 +0000
@@ -866,7 +866,7 @@
team: PTeam;
SortFactor: QWord;
end;
- currsorter: PGear;
+ currsorter: PGear = nil;
procedure doStepTeamHealthSorterWork(Gear: PGear);
var i: LongInt;
@@ -906,7 +906,8 @@
SortFactor:= (SortFactor shl 30) + TeamsArray[t]^.TeamHealth;
end;
-repeat
+if TeamsCount > 1 then
+ repeat
b:= true;
for t:= 0 to TeamsCount - 2 do
if (thexchar[t].SortFactor > thexchar[Succ(t)].SortFactor) then
@@ -916,7 +917,7 @@
thexchar[Succ(t)]:= thexchar[cMaxTeams];
b:= false
end
-until b;
+ until b;
t:= cScreenHeight - 4;
for i:= 0 to Pred(TeamsCount) do
diff -r f6e5f4e122db -r 78a68cc4d846 hedgewars/uConsts.pas
--- a/hedgewars/uConsts.pas Tue Sep 18 19:52:46 2007 +0000
+++ b/hedgewars/uConsts.pas Thu Sep 20 20:00:10 2007 +0000
@@ -137,7 +137,8 @@
cInactDelay = 1500;
- gfForts = $00000001;
+ gfForts = $00000001;
+ gfOneClanMode = $10000000;
gstDrowning = $00000001;
gstHHDriven = $00000002;
diff -r f6e5f4e122db -r 78a68cc4d846 hedgewars/uGears.pas
--- a/hedgewars/uGears.pas Tue Sep 18 19:52:46 2007 +0000
+++ b/hedgewars/uGears.pas Thu Sep 20 20:00:10 2007 +0000
@@ -251,7 +251,7 @@
end;
gtCase: begin
Result^.Radius:= 16;
- Result^.Elasticity:= _0_4
+ Result^.Elasticity:= _0_3
end;
gtDEagleShot: begin
Result^.Radius:= 1;
@@ -294,7 +294,8 @@
Result^.Z:= cCurrHHZ
end;
gtTarget: begin
- Result^.Radius:= 16
+ Result^.Radius:= 16;
+ Result^.Elasticity:= _0_3
end;
end;
InsertGearToList(Result);
diff -r f6e5f4e122db -r 78a68cc4d846 hedgewars/uTeams.pas
--- a/hedgewars/uTeams.pas Tue Sep 18 19:52:46 2007 +0000
+++ b/hedgewars/uTeams.pas Thu Sep 20 20:00:10 2007 +0000
@@ -106,7 +106,8 @@
AliveClan:= ClansArray[t]
end;
-if AliveCount >= 2 then exit(false);
+if (AliveCount > 1) or
+ ((AliveCount = 1) and ((GameFlags and gfOneClanMode) <> 0)) then exit(false);
CheckForWin:= true;
TurnTimeLeft:= 0;