hedgewars/uCommandHandlers.pas
branchwebgl
changeset 8444 75db7bb8dce8
parent 8330 aaefa587e277
parent 8370 0c79946e96f8
child 8833 c13ebed437cb
equal deleted inserted replaced
8340:46a9fde631f4 8444:75db7bb8dce8
    87     SendIPC(_S'H');
    87     SendIPC(_S'H');
    88     GameState:= gsExit
    88     GameState:= gsExit
    89 end;
    89 end;
    90 
    90 
    91 procedure chCheckProto(var s: shortstring);
    91 procedure chCheckProto(var s: shortstring);
    92 var i, c: LongInt;
    92 var i: LongInt;
    93 begin
    93 begin
    94     if isDeveloperMode then
    94     if isDeveloperMode then
    95         begin
    95         begin
    96         val(s, i, c);
    96         i:= StrToInt(s);
    97         TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    97         TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    98         TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    98         TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new (got '+intToStr(i)+', expecting '+intToStr(cNetProtoVersion)+')', true);
    99         end
    99         end
   100 end;
   100 end;
   101 
   101