equal
deleted
inserted
replaced
382 AddGear(X, Y, gtSmallDamage, Damage, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; |
382 AddGear(X, Y, gtSmallDamage, Damage, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; |
383 end; |
383 end; |
384 |
384 |
385 procedure ProcessGears; |
385 procedure ProcessGears; |
386 const delay: LongWord = 0; |
386 const delay: LongWord = 0; |
387 step: (stDelay, stChDmg, stChWin, stTurnReact, |
387 step: (stDelay, stChDmg, stTurnReact, |
388 stAfterDelay, stSpawn, stNTurn) = stDelay; |
388 stAfterDelay, stChWin, stSpawn, stNTurn) = stDelay; |
389 var Gear, t: PGear; |
389 var Gear, t: PGear; |
390 begin |
390 begin |
391 PrvInactive:= AllInactive; |
391 PrvInactive:= AllInactive; |
392 AllInactive:= true; |
392 AllInactive:= true; |
393 t:= GearsList; |
393 t:= GearsList; |
408 |
408 |
409 if delay = 0 then |
409 if delay = 0 then |
410 inc(step) |
410 inc(step) |
411 end; |
411 end; |
412 stChDmg: if CheckNoDamage then inc(step) else step:= stDelay; |
412 stChDmg: if CheckNoDamage then inc(step) else step:= stDelay; |
413 stChWin: if not CheckForWin then inc(step) else step:= stDelay; |
|
414 stTurnReact: begin |
413 stTurnReact: begin |
415 if not isInMultiShoot then |
414 if not isInMultiShoot then |
416 begin |
415 begin |
417 uStats.TurnReaction; |
416 uStats.TurnReaction; |
418 inc(step) |
417 inc(step) |
426 dec(delay); |
425 dec(delay); |
427 |
426 |
428 if delay = 0 then |
427 if delay = 0 then |
429 inc(step) |
428 inc(step) |
430 end; |
429 end; |
|
430 stChWin: if not CheckForWin then inc(step) else step:= stDelay; |
431 stSpawn: begin |
431 stSpawn: begin |
432 if not isInMultiShoot then SpawnBoxOfSmth; |
432 if not isInMultiShoot then SpawnBoxOfSmth; |
433 inc(step) |
433 inc(step) |
434 end; |
434 end; |
435 stNTurn: begin |
435 stNTurn: begin |
436 //AwareOfExplosion(0, 0, 0); |
|
437 if isInMultiShoot then isInMultiShoot:= false |
436 if isInMultiShoot then isInMultiShoot:= false |
438 else begin |
437 else begin |
439 ParseCommand('/nextturn', true); |
438 ParseCommand('/nextturn', true); |
440 end; |
439 end; |
441 step:= Low(step) |
440 step:= Low(step) |
449 |
448 |
450 if (not CurrentTeam^.ExtDriven) and |
449 if (not CurrentTeam^.ExtDriven) and |
451 ((GameTicks and $FFFF) = $FFFF) then |
450 ((GameTicks and $FFFF) = $FFFF) then |
452 begin |
451 begin |
453 SendIPCTimeInc; |
452 SendIPCTimeInc; |
454 inc(hiTicks) // we do not recieve a message for it |
453 inc(hiTicks) // we do not recieve a message for this |
455 end; |
454 end; |
456 |
455 |
457 inc(GameTicks) |
456 inc(GameTicks) |
458 end; |
457 end; |
459 |
458 |