hedgewars/uIO.pas
changeset 2124 d39c61eaca15
parent 2066 d0e3f570b901
child 2154 3d2917be12c3
equal deleted inserted replaced
2123:c49832b4bb38 2124:d39c61eaca15
   250 
   250 
   251 while (headcmd <> nil)
   251 while (headcmd <> nil)
   252 	and tmpflag
   252 	and tmpflag
   253 	and ((GameTicks = headcmd^.Time)
   253 	and ((GameTicks = headcmd^.Time)
   254 		or (headcmd^.cmd = 's')
   254 		or (headcmd^.cmd = 's')
       
   255 		or (headcmd^.cmd = 'b')
   255 		or (headcmd^.cmd = 'F')) do
   256 		or (headcmd^.cmd = 'F')) do
   256 	begin
   257 	begin
   257 	case headcmd^.cmd of
   258 	case headcmd^.cmd of
   258 		'+': ; // do nothing - it's just empty packet
   259 		'+': ; // do nothing - it's just empty packet
   259 		'L': ParseCommand('+left', true);
   260 		'L': ParseCommand('+left', true);
   293 			end;
   294 			end;
   294 		'w': ParseCommand('setweap ' + headcmd^.str[2], true);
   295 		'w': ParseCommand('setweap ' + headcmd^.str[2], true);
   295 		't': ParseCommand('taunt ' + headcmd^.str[2], true);
   296 		't': ParseCommand('taunt ' + headcmd^.str[2], true);
   296 		'g': ParseCommand('newgrave', true);
   297 		'g': ParseCommand('newgrave', true);
   297 		'h': ParseCommand('hogsay ' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);
   298 		'h': ParseCommand('hogsay ' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);
       
   299 		'b': if LocalClan = byte(headcmd^.str[2]) then
       
   300                begin
       
   301                s:= copy(headcmd^.str, 3, Pred(headcmd^.len));
       
   302                AddChatString(s);
       
   303                WriteLnToConsole(s)
       
   304                end;
   298 		'1'..'5': ParseCommand('timer ' + headcmd^.cmd, true);
   305 		'1'..'5': ParseCommand('timer ' + headcmd^.cmd, true);
   299 		#128..char(128 + cMaxSlotIndex): ParseCommand('slot ' + char(byte(headcmd^.cmd) - 79), true)
   306 		#128..char(128 + cMaxSlotIndex): ParseCommand('slot ' + char(byte(headcmd^.cmd) - 79), true)
   300 		else
   307 		else
   301 			OutError('Unexpected protocol command: ' + headcmd^.cmd, True)
   308 			OutError('Unexpected protocol command: ' + headcmd^.cmd, True)
   302 		end;
   309 		end;