hedgewars/uGears.pas
changeset 92 0c359a7a2356
parent 89 f9db56409a86
child 95 1ef5e2c41115
equal deleted inserted replaced
91:5688d2141464 92:0c359a7a2356
   291             
   291             
   292             Gear.Damage:= 0
   292             Gear.Damage:= 0
   293             end;
   293             end;
   294       Gear:= Gear.NextGear
   294       Gear:= Gear.NextGear
   295       end;
   295       end;
   296 CheckForWin
       
   297 end;
   296 end;
   298 
   297 
   299 procedure ProcessGears;
   298 procedure ProcessGears;
   300 const delay: integer = cInactDelay;
   299 const delay: integer = cInactDelay;
   301       step: (stDelay, stChDmg, stSpawn, stNTurn) = stDelay;
   300       step: (stDelay, stChDmg, stChWin, stSpawn, stNTurn) = stDelay;
   302 var Gear, t: PGear;
   301 var Gear, t: PGear;
   303 {$IFDEF COUNTTICKS}
   302 {$IFDEF COUNTTICKS}
   304     tickcntA, tickcntB: LongWord;
   303     tickcntA, tickcntB: LongWord;
   305 const cntSecTicks: LongWord = 0;
   304 const cntSecTicks: LongWord = 0;
   306 {$ENDIF}
   305 {$ENDIF}
   334                     inc(step);
   333                     inc(step);
   335                     delay:= cInactDelay
   334                     delay:= cInactDelay
   336                     end
   335                     end
   337                  end;
   336                  end;
   338         stChDmg: if CheckNoDamage then inc(step) else step:= stDelay;
   337         stChDmg: if CheckNoDamage then inc(step) else step:= stDelay;
       
   338         stChWin: if not CheckForWin then inc(step) else step:= stDelay; 
   339         stSpawn: begin
   339         stSpawn: begin
   340                  if not isInMultiShoot then SpawnBoxOfSmth;
   340                  if not isInMultiShoot then SpawnBoxOfSmth;
   341                  inc(step)
   341                  inc(step)
   342                  end;
   342                  end;
   343         stNTurn: begin
   343         stNTurn: begin