hedgewars/uIO.pas
branchqmlfrontend
changeset 10886 99273b7afbff
parent 10748 dc587913987c
parent 10862 4575977d3ce0
child 11071 3851ce4f2061
equal deleted inserted replaced
10823:1ff3dd3705b1 10886:99273b7afbff
   141              isProcessed:= false;
   141              isProcessed:= false;
   142      'b': if gameType = gmtNet then
   142      'b': if gameType = gmtNet then
   143              ParseChatCommand('chatmsg ' + #4, s, 2)
   143              ParseChatCommand('chatmsg ' + #4, s, 2)
   144           else
   144           else
   145              isProcessed:= false;
   145              isProcessed:= false;
       
   146      'Y': ChatPasteBuffer:= copy(s, 2, Length(s) - 1);
   146      else
   147      else
   147         isProcessed:= false;
   148         isProcessed:= false;
   148      end;
   149      end;
   149 
   150 
   150     if (not isProcessed) then
   151     if (not isProcessed) then
   368             IntToStr(hiTicks shl 16 + headcmd^.loTime) + ')',
   369             IntToStr(hiTicks shl 16 + headcmd^.loTime) + ')',
   369             true);
   370             true);
   370 
   371 
   371 isInLag:= (headcmd = nil) and tmpflag and (not CurrentTeam^.hasGone);
   372 isInLag:= (headcmd = nil) and tmpflag and (not CurrentTeam^.hasGone);
   372 
   373 
   373 if isInLag then fastUntilLag:= false
   374 if isInLag and fastUntilLag then 
       
   375 begin
       
   376     ParseCommand('spectate 0', true);
       
   377     fastUntilLag:= false
       
   378 end;
   374 end;
   379 end;
   375 
   380 
   376 procedure chFatalError(var s: shortstring);
   381 procedure chFatalError(var s: shortstring);
   377 begin
   382 begin
   378     SendIPC('E' + s);
   383     SendIPC('E' + s);
   396     exit
   401     exit
   397     end;
   402     end;
   398 
   403 
   399 with CurrentHedgehog^.Gear^,
   404 with CurrentHedgehog^.Gear^,
   400     CurrentHedgehog^ do
   405     CurrentHedgehog^ do
   401     if (State and gstHHChooseTarget) <> 0 then
   406     if (State and gstChooseTarget) <> 0 then
   402         begin
   407         begin
   403         isCursorVisible:= false;
   408         isCursorVisible:= false;
   404         if not CurrentTeam^.ExtDriven then
   409         if not CurrentTeam^.ExtDriven then
   405             begin
   410             begin
   406             if fromAI then
   411             if fromAI then
   419             begin
   424             begin
   420             TargetPoint.X:= putX;
   425             TargetPoint.X:= putX;
   421             TargetPoint.Y:= putY
   426             TargetPoint.Y:= putY
   422             end;
   427             end;
   423         AddFileLog('put: ' + inttostr(TargetPoint.X) + ', ' + inttostr(TargetPoint.Y));
   428         AddFileLog('put: ' + inttostr(TargetPoint.X) + ', ' + inttostr(TargetPoint.Y));
   424         State:= State and (not gstHHChooseTarget);
   429         State:= State and (not gstChooseTarget);
   425         if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackingPut) <> 0 then
   430         if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackingPut) <> 0 then
   426             Message:= Message or (gmAttack and InputMask);
   431             Message:= Message or (gmAttack and InputMask);
   427         end
   432         end
   428     else
   433     else
   429         if CurrentTeam^.ExtDriven then
   434         if CurrentTeam^.ExtDriven then