merge the 2 heads. I hope I did it right. also I increased proto and ver number
--- a/CMakeLists.txt Mon Sep 19 23:55:52 2011 +0400
+++ b/CMakeLists.txt Mon Sep 19 23:25:13 2011 +0200
@@ -41,8 +41,8 @@
#versioning
set(CPACK_PACKAGE_VERSION_MAJOR 0)
set(CPACK_PACKAGE_VERSION_MINOR 9)
-set(CPACK_PACKAGE_VERSION_PATCH 16${version_suffix})
-set(HEDGEWARS_PROTO_VER 38)
+set(CPACK_PACKAGE_VERSION_PATCH 17${version_suffix})
+set(HEDGEWARS_PROTO_VER 40)
set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
@@ -262,10 +262,10 @@
"config\\\\.inc$"
"hwengine\\\\.desktop$"
"CMakeCache\\\\.txt$"
- "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libopenalbridge"
- "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libfreetype"
- "^${CMAKE_CURRENT_SOURCE_DIR}/misc/liblua"
- "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libtremor"
+# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libopenalbridge"
+# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libfreetype"
+# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/liblua"
+# "^${CMAKE_CURRENT_SOURCE_DIR}/misc/libtremor"
"^${CMAKE_CURRENT_SOURCE_DIR}/project_files/HedgewarsMobile/"
"^${CMAKE_CURRENT_SOURCE_DIR}/bin/[a-z]"
"^${CMAKE_CURRENT_SOURCE_DIR}/tools/templates"
--- a/QTfrontend/chatwidget.cpp Mon Sep 19 23:55:52 2011 +0400
+++ b/QTfrontend/chatwidget.cpp Mon Sep 19 23:25:13 2011 +0200
@@ -203,7 +203,7 @@
QList<QListWidgetItem *> items = chatNicks->findItems(nick, Qt::MatchExactly);
if (items.size() < 1)
return;
- QMenu * popup = new QMenu();
+ QMenu * popup = new QMenu(this);
// selecting an item will automatically scroll there, so let's save old position
QScrollBar * scrollBar = chatNicks->verticalScrollBar();
int oldScrollPos = scrollBar->sliderPosition();
--- a/QTfrontend/newnetclient.cpp Mon Sep 19 23:55:52 2011 +0400
+++ b/QTfrontend/newnetclient.cpp Mon Sep 19 23:25:13 2011 +0200
@@ -826,7 +826,7 @@
case 0:
{
bool ok = false;
- QString newNick = QInputDialog::getText(0, tr("Nickname"), tr("Some one already uses\n your nickname %1\non the server.\nPlease pick another nickname:").arg(mynick), QLineEdit::Normal, mynick, &ok);
+ QString newNick = QInputDialog::getText(m_pGameCFGWidget, tr("Nickname"), tr("Some one already uses\n your nickname %1\non the server.\nPlease pick another nickname:").arg(mynick), QLineEdit::Normal, mynick, &ok);
if (!ok || newNick.isEmpty()) {
Disconnect();
--- a/QTfrontend/pagenetgame.cpp Mon Sep 19 23:55:52 2011 +0400
+++ b/QTfrontend/pagenetgame.cpp Mon Sep 19 23:25:13 2011 +0200
@@ -41,6 +41,7 @@
pChatWidget->setShowFollow(false); // don't show follow in nicks' context menus
pageLayout->addWidget(pChatWidget, 2, 0, 1, 2);
pageLayout->setRowStretch(1, 100);
+ pageLayout->setRowStretch(2, 100);
pGameCFG = new GameCFGWidget(this);
pageLayout->addWidget(pGameCFG, 0, 0);
--- a/hedgewars/HHHandlers.inc Mon Sep 19 23:55:52 2011 +0400
+++ b/hedgewars/HHHandlers.inc Mon Sep 19 23:25:13 2011 +0200
@@ -1016,7 +1016,7 @@
////////////////////////////////////////////////////////////////////////////////
procedure doStepHedgehogFree(Gear: PGear);
-var prevState: Longword;
+var prevState, i: Longword;
begin
prevState:= Gear^.State;
@@ -1038,7 +1038,7 @@
PrvInactive:= false;
AllInactive:= false;
- if (Gear^.State and gstHHGone) = 0 then
+ if not Gear^.Hedgehog^.Team^.hasGone then
begin
Gear^.Hedgehog^.Effects[hePoisoned] := false;
if Gear^.Hedgehog^.Effects[heResurrectable] then begin
@@ -1052,8 +1052,21 @@
end
else
begin
+ Gear^.State:= Gear^.State or gstHHGone;
Gear^.doStep:= @doStepHedgehogGone;
+ with Gear^.Hedgehog^.Team^ do
+ for i:= 0 to cMaxHHIndex do
+ if Hedgehogs[i].GearHidden <> nil then
+ begin
+ RestoreHog(@Hedgehogs[i]);
+ if Hedgehogs[i].Gear <> nil then
+ begin
+ Hedgehogs[i].Gear^.State:= Gear^.State or gstHHGone;
+ Hedgehogs[i].Gear^.doStep:= @doStepHedgehogGone
+ end
+ end;
+
// Gone message
AddCaption(Format(GetEventString(eidGone), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage);
end
--- a/hedgewars/uGears.pas Mon Sep 19 23:55:52 2011 +0400
+++ b/hedgewars/uGears.pas Mon Sep 19 23:25:13 2011 +0200
@@ -224,6 +224,7 @@
gear^.SoundChannel:= -1;
gear^.ImpactSound:= sndNone;
gear^.nImpactSounds:= 0;
+gear^.Density:= _1;
// Define ammo association, if any.
gear^.AmmoType:= GearKindAmmoTypeMap[Kind];
if Ammoz[Gear^.AmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0 then gear^.Z:= cHHZ+1
--- a/hedgewars/uScript.pas Mon Sep 19 23:55:52 2011 +0400
+++ b/hedgewars/uScript.pas Mon Sep 19 23:25:13 2011 +0200
@@ -1207,6 +1207,11 @@
lua_pushinteger(L, hwRound(gear^.X));
lua_pushinteger(L, hwRound(gear^.Y))
end
+ else
+ begin
+ lua_pushnil(L);
+ lua_pushnil(L)
+ end;
end;
lc_getgearposition:= 2;
end;
--- a/hedgewars/uTeams.pas Mon Sep 19 23:55:52 2011 +0400
+++ b/hedgewars/uTeams.pas Mon Sep 19 23:25:13 2011 +0200
@@ -427,17 +427,12 @@
with Team do
for i:= 0 to cMaxHHIndex do
with Hedgehogs[i] do
- begin
- if Hedgehogs[i].GearHidden <> nil then
- RestoreHog(@Hedgehogs[i]);
-
if Gear <> nil then
begin
Gear^.Invulnerable:= false;
Gear^.Damage:= Gear^.Health;
Gear^.State:= (Gear^.State or gstHHGone) and not gstHHDriven
end
- end
end;
procedure chAddHH(var id: shortstring);