diff -r f13a67ce3811 -r ba582673db7d hedgewars/uConsole.pas --- a/hedgewars/uConsole.pas Fri May 16 13:21:18 2008 +0000 +++ b/hedgewars/uConsole.pas Sat May 17 11:36:24 2008 +0000 @@ -29,6 +29,7 @@ procedure WriteLnToConsole(s: shortstring); procedure KeyPressConsole(Key: Longword); procedure ParseCommand(CmdStr: shortstring; TrustedSource: boolean); +procedure StopMessages(Message: Longword); function GetLastConsoleLine: shortstring; procedure doPut(putX, putY: LongInt; fromAI: boolean); @@ -316,6 +317,15 @@ else GetLastConsoleLine:= ConsoleLines[Pred(CurrLine)].s end; +procedure StopMessages(Message: Longword); +begin +if (Message and gm_Left) <> 0 then ParseCommand('/-left', true) else +if (Message and gm_Right) <> 0 then ParseCommand('/-right', true) else +if (Message and gm_Up) <> 0 then ParseCommand('/-up', true) else +if (Message and gm_Down) <> 0 then ParseCommand('/-down', true) else +if (Message and gm_Attack) <> 0 then ParseCommand('/-attack', true) +end; + {$INCLUDE CCHandlers.inc} initialization