hedgewars/uCommandHandlers.pas
changeset 7104 2468316c1d9d
parent 7103 1c1afb5a1565
child 7151 ec15d9e1a7e3
equal deleted inserted replaced
7103:1c1afb5a1565 7104:2468316c1d9d
   411     ScriptCall('onSwitch');
   411     ScriptCall('onSwitch');
   412 end;
   412 end;
   413 
   413 
   414 procedure chNextTurn(var s: shortstring);
   414 procedure chNextTurn(var s: shortstring);
   415 var checksum: Longword;
   415 var checksum: Longword;
       
   416     gi: PGear;
   416 begin
   417 begin
   417     s:= s; // avoid compiler hint
   418     s:= s; // avoid compiler hint
   418 
   419 
   419     TryDo(AllInactive, '/nextturn called when not all gears are inactive', true);
   420     TryDo(AllInactive, '/nextturn called when not all gears are inactive', true);
   420 
   421 
   421     checksum:= GameTicks;
   422     checksum:= GameTicks;
       
   423     gi := GearsList;
       
   424     while gi <> nil do
       
   425         begin
       
   426         with gi^ do checksum:= checksum xor X.round xor X.frac xor dX.round xor dX.frac xor Y.round xor Y.frac xor dY.round xor dY.frac;
       
   427         gi := gi^.NextGear
       
   428         end;
   422 
   429 
   423     if not CurrentTeam^.ExtDriven then
   430     if not CurrentTeam^.ExtDriven then
   424         begin
   431         begin
   425         s[0]:= #5;
   432         s[0]:= #5;
   426         s[1]:= 'N';
   433         s[1]:= 'N';