# HG changeset patch
# User unc0rr
# Date 1155822858 0
# Node ID d975a426ebf7ed42e451d298b2f5193a01213cbb
# Parent ca5f06017e993de06a2842423328de37d48dab37
- Many small fixes in engine
- Better widget placement and translation update in frontend
diff -r ca5f06017e99 -r d975a426ebf7 QTfrontend/pages.cpp
--- a/QTfrontend/pages.cpp Wed Aug 16 21:35:27 2006 +0000
+++ b/QTfrontend/pages.cpp Thu Aug 17 13:54:18 2006 +0000
@@ -355,7 +355,9 @@
NNGroupBox = new QGroupBox(this);
NNGroupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
NNGroupBox->setTitle(QGroupBox::tr("Net options"));
- pageLayout->addWidget(NNGroupBox, 1, 1);
+ pageLayout->addWidget(NNGroupBox, 0, 1);
+
+ pageLayout->addWidget(new QWidget(), 1, 1);
QGridLayout * GBNlayout = new QGridLayout(NNGroupBox);
labelNN = new QLabel(NNGroupBox);
diff -r ca5f06017e99 -r d975a426ebf7 QTfrontend/translations/hedgewars_ru.qm
Binary file QTfrontend/translations/hedgewars_ru.qm has changed
diff -r ca5f06017e99 -r d975a426ebf7 QTfrontend/translations/hedgewars_ru.ts
--- a/QTfrontend/translations/hedgewars_ru.ts Wed Aug 16 21:35:27 2006 +0000
+++ b/QTfrontend/translations/hedgewars_ru.ts Thu Aug 17 13:54:18 2006 +0000
@@ -7,7 +7,7 @@
- Не могу создать папку %1
+ Не могу создать папку %1
@@ -59,6 +59,10 @@
Не могу открыть демо %1
+
+
+ Ошибка запуска движка: %1 (
+
HWNet
@@ -118,7 +122,11 @@
- Имя игрока
+ Имя игрока
+
+
+
+ Настройки сети
@@ -127,6 +135,10 @@
Имя игрока
+
+
+ Адрес сервера
+
QLineEdit
@@ -143,6 +155,21 @@
+ QObject
+
+
+ Ошибка
+
+
+
+ Не могу создать папку %1
+
+
+
+ Выйти
+
+
+
QPushButton
diff -r ca5f06017e99 -r d975a426ebf7 hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc Wed Aug 16 21:35:27 2006 +0000
+++ b/hedgewars/GSHandlers.inc Thu Aug 17 13:54:18 2006 +0000
@@ -348,7 +348,10 @@
gtATFinishGame: begin
AllInactive:= false;
if Gear.Timer = 0 then
+ begin
+ SendIPC('N');
GameState:= gsExit
+ end
end;
end;
if Gear.Timer = 0 then DeleteGear(Gear)
@@ -439,8 +442,8 @@
State:= State or gstFalling;
end;
DeleteGear(Gear);
- OnUsedAmmo(PHedgehog(Gear.Hedgehog)^.Ammo);
- ApplyAmmoChanges(PHedgehog(Gear.Hedgehog)^)
+ OnUsedAmmo(PHedgehog(HHGear.Hedgehog)^.Ammo);
+ ApplyAmmoChanges(PHedgehog(HHGear.Hedgehog)^)
end;
begin
@@ -551,8 +554,8 @@
var HHGear: PGear;
tx, ty, tt: Double;
begin
-Gear.X:= Gear.X + Gear.dX;
-Gear.Y:= Gear.Y + Gear.dY;
+Gear.X:= Gear.X - Gear.dX;
+Gear.Y:= Gear.Y - Gear.dY;
Gear.Elasticity:= Gear.Elasticity + 1.0;
HHGear:= PHedgehog(Gear.Hedgehog)^.Gear;
if (HHGear.State and gstFalling) <> 0 then
@@ -584,8 +587,8 @@
with HHGear^ do State:= State and not gstAttacking;
tt:= 0
end;
- tx:= tx - Gear.dX - Gear.dX;
- ty:= ty - Gear.dY - Gear.dY;
+ tx:= tx + Gear.dX - Gear.dX;
+ ty:= ty + Gear.dY - Gear.dY;
tt:= tt - 2.0;
end;
end;
@@ -611,6 +614,8 @@
procedure doStepRope(Gear: PGear);
begin
+Gear.dX:= - Gear.dX;
+Gear.dY:= - Gear.dY;
Gear.doStep:= doStepRopeAttach
end;
diff -r ca5f06017e99 -r d975a426ebf7 hedgewars/HHHandlers.inc
--- a/hedgewars/HHHandlers.inc Wed Aug 16 21:35:27 2006 +0000
+++ b/hedgewars/HHHandlers.inc Thu Aug 17 13:54:18 2006 +0000
@@ -321,7 +321,7 @@
if not TestCollisionXwithXYShift(Gear, hwSign(Gear.dX) - Gear.dX, -3, hwSign(Gear.dX)) then begin Gear.X:= Gear.X + Gear.dX; Gear.dX:= Gear.dX * 0.90; Gear.Y:= Gear.Y - 3 end else
if not TestCollisionXwithXYShift(Gear, hwSign(Gear.dX) - Gear.dX, -4, hwSign(Gear.dX)) then begin Gear.X:= Gear.X + Gear.dX; Gear.dX:= Gear.dX * 0.87; Gear.Y:= Gear.Y - 4 end else
if not TestCollisionXwithXYShift(Gear, hwSign(Gear.dX) - Gear.dX, -5, hwSign(Gear.dX)) then begin Gear.X:= Gear.X + Gear.dX; Gear.dX:= Gear.dX * 0.84; Gear.Y:= Gear.Y - 5 end else
- if abs(Gear.dX) > 0.02 then Gear.dX:= -0.5 * Gear.dX
+ if abs(Gear.dX) > 0.02 then Gear.dX:= -0.2 * Gear.dX
else begin
Gear.State:= Gear.State and not gstMoving;
Gear.dX:= 0.0000001 * hwSign(Gear.dX)
diff -r ca5f06017e99 -r d975a426ebf7 hedgewars/uGame.pas
--- a/hedgewars/uGame.pas Wed Aug 16 21:35:27 2006 +0000
+++ b/hedgewars/uGame.pas Thu Aug 17 13:54:18 2006 +0000
@@ -54,13 +54,14 @@
end
else begin
ProcessKbd;
- NetGetNextCmd; // its for the case when receiving /say message
+ NetGetNextCmd; // its for the case when receiving "/say" message
+ isInLag:= false;
+ inc(SendEmptyPacketTicks, Lag);
if SendEmptyPacketTicks >= cSendEmptyPacketTime then
begin
- SendIPC('+');
+ SendIPC('N');
SendEmptyPacketTicks:= 0
- end;
- inc(SendEmptyPacketTicks, Lag)
+ end
end;
if Lag > 100 then Lag:= 100
@@ -79,7 +80,7 @@
NetGetNextCmd;
if isInLag then
case GameType of
- gmtNet: break;
+ gmtNet: break;
gmtDemo: begin
GameState:= gsExit;
exit
@@ -94,7 +95,6 @@
end;
inc(i)
end;
-if not CurrentTeam.ExtDriven then isInLag:= false;
MoveCamera
end;