# HG changeset patch # User unc0rr # Date 1155566980 0 # Node ID 330a2dbacd67525ca63657aa4117a53ff556f15a # Parent ab0340f580c2f8890a33f0404752c51839644bc7 - Use right packet length - Show messagebox when failed to run engine diff -r ab0340f580c2 -r 330a2dbacd67 QTfrontend/game.cpp --- a/QTfrontend/game.cpp Sat Aug 12 17:41:02 2006 +0000 +++ b/QTfrontend/game.cpp Mon Aug 14 14:49:40 2006 +0000 @@ -231,6 +231,7 @@ QProcess * process; QStringList arguments; process = new QProcess; + connect(process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(StartProcessError(QProcess::ProcessError))); arguments << resolutions[0][config->vid_Resolution()]; arguments << resolutions[1][config->vid_Resolution()]; arguments << "16"; @@ -241,6 +242,13 @@ process->start(bindir->absolutePath() + "/hwengine", arguments); } +void HWGame::StartProcessError(QProcess::ProcessError error) +{ + QMessageBox::critical(0, tr("Error"), + tr("Unable to run engine: %1 (") + .arg(error) + bindir->absolutePath() + "/hwengine)"); +} + void HWGame::AddTeam(const QString & teamname) { if (TeamCount == 5) return; diff -r ab0340f580c2 -r 330a2dbacd67 QTfrontend/game.h --- a/QTfrontend/game.h Sat Aug 12 17:41:02 2006 +0000 +++ b/QTfrontend/game.h Mon Aug 14 14:49:40 2006 +0000 @@ -40,6 +40,7 @@ #include #include #include +#include #include "team.h" #include "rndstr.h" @@ -104,6 +105,7 @@ void NewConnection(); void ClientDisconnect(); void ClientRead(); + void StartProcessError(QProcess::ProcessError error); }; #endif diff -r ab0340f580c2 -r 330a2dbacd67 hedgewars/CCHandlers.inc --- a/hedgewars/CCHandlers.inc Sat Aug 12 17:41:02 2006 +0000 +++ b/hedgewars/CCHandlers.inc Mon Aug 14 14:49:40 2006 +0000 @@ -317,7 +317,7 @@ SDL_GetMouseState(@TargetPoint.X, @TargetPoint.Y); dec(TargetPoint.X, WorldDx); dec(TargetPoint.Y, WorldDy); - s[0]:= #9; + s[0]:= #5; s[1]:= 'p'; PSmallInt(@s[2])^:= TargetPoint.X; PSmallInt(@s[4])^:= TargetPoint.Y; diff -r ab0340f580c2 -r 330a2dbacd67 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Sat Aug 12 17:41:02 2006 +0000 +++ b/hedgewars/uWorld.pas Mon Aug 14 14:49:40 2006 +0000 @@ -366,7 +366,7 @@ begin if (not CurrentTeam.ExtDriven)and(GameTicks >= PrevSentPointTime + cSendCursorPosTime) then begin - s[0]:= #9; + s[0]:= #5; s[1]:= 'P'; PSmallInt(@s[2])^:= CursorPoint.X - WorldDx; PSmallInt(@s[4])^:= CursorPoint.Y - WorldDy;