hedgewars/uGame.pas
changeset 167 805fa9a27e9e
parent 162 4822f6face35
child 183 57c2ef19f719
equal deleted inserted replaced
166:2920ab2bf329 167:805fa9a27e9e
    45 
    45 
    46 procedure DoGameTick(Lag: integer);
    46 procedure DoGameTick(Lag: integer);
    47 const SendEmptyPacketTicks: LongWord = 0;
    47 const SendEmptyPacketTicks: LongWord = 0;
    48 var i: integer;
    48 var i: integer;
    49 begin
    49 begin
    50 if CurrentTeam.ExtDriven then
    50 if not CurrentTeam.ExtDriven then
    51    begin
    51    begin
    52    if (GameType = gmtDemo) then
       
    53       ProcessKbdDemo;
       
    54    end
       
    55    else begin
       
    56    ProcessKbd;
       
    57    NetGetNextCmd; // its for the case when receiving "/say" message
    52    NetGetNextCmd; // its for the case when receiving "/say" message
    58    isInLag:= false;
    53    isInLag:= false;
    59    inc(SendEmptyPacketTicks, Lag);
    54    inc(SendEmptyPacketTicks, Lag);
    60    if SendEmptyPacketTicks >= cSendEmptyPacketTime then
    55    if SendEmptyPacketTicks >= cSendEmptyPacketTime then
    61       begin
    56       begin