hedgewars/uIO.pas
changeset 10349 a51de45dcc42
parent 10343 fe9853dea6c4
child 10392 5012e1f9e893
equal deleted inserted replaced
10348:8a90df36bccb 10349:a51de45dcc42
    74 begin
    74 begin
    75 new(command);
    75 new(command);
    76 FillChar(command^, sizeof(TCmd), 0);
    76 FillChar(command^, sizeof(TCmd), 0);
    77 command^.loTime:= Time;
    77 command^.loTime:= Time;
    78 command^.str:= str;
    78 command^.str:= str;
    79 if command^.cmd <> 'F' then dec(command^.len, 2); // cut timestamp
    79 if (command^.cmd <> 'F') and (command^.cmd <> 'G') then dec(command^.len, 2); // cut timestamp
    80 if headcmd = nil then
    80 if headcmd = nil then
    81     begin
    81     begin
    82     headcmd:= command;
    82     headcmd:= command;
    83     lastcmd:= command
    83     lastcmd:= command
    84     end
    84     end
   367             ParseCommand('chatmsg ' + #4 + s, true);
   367             ParseCommand('chatmsg ' + #4 + s, true);
   368             WriteLnToConsole(s)
   368             WriteLnToConsole(s)
   369              end;
   369              end;
   370         'F': ParseCommand('teamgone u' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);
   370         'F': ParseCommand('teamgone u' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);
   371         'G': ParseCommand('teamback u' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);
   371         'G': ParseCommand('teamback u' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);
   372         'f': ParseCommand('teamgone s' + copy(headcmd^.str, 2, headcmd^.len - 3), true);
   372         'f': ParseCommand('teamgone s' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);
   373         'g': ParseCommand('teamback s' + copy(headcmd^.str, 2, headcmd^.len - 3), true);
   373         'g': ParseCommand('teamback s' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);
   374         'N': begin
   374         'N': begin
   375             tmpflag:= false;
   375             tmpflag:= false;
   376             lastTurnChecksum:= SDLNet_Read32(@headcmd^.str[2]);
   376             lastTurnChecksum:= SDLNet_Read32(@headcmd^.str[2]);
   377             AddFileLog('got cmd "N": time '+IntToStr(hiTicks shl 16 + headcmd^.loTime))
   377             AddFileLog('got cmd "N": time '+IntToStr(hiTicks shl 16 + headcmd^.loTime))
   378              end;
   378              end;