4098 DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy - |
4098 DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy - |
4099 cHHRadius - 14 - hh^.HealthTagTex^.h, hh^.HealthTagTex); |
4099 cHHRadius - 14 - hh^.HealthTagTex^.h, hh^.HealthTagTex); |
4100 DrawCircle(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Radius, 1.5, 0, 0, $FF, |
4100 DrawCircle(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Radius, 1.5, 0, 0, $FF, |
4101 $FF); |
4101 $FF); |
4102 |
4102 |
|
4103 doStepHedgehogMoving(hh^.Gear); |
|
4104 |
4103 if ((Gear^.Message and gmUp) <> 0) then begin |
4105 if ((Gear^.Message and gmUp) <> 0) then begin |
4104 if (GameTicks and $F) <> 0 then exit; |
4106 if (GameTicks and $F) <> 0 then exit; |
4105 end else begin |
4107 end else begin |
4106 if (GameTicks and $1FF) <> 0 then exit; |
4108 if (GameTicks and $1FF) <> 0 then exit; |
4107 end; |
4109 end; |
4108 |
4110 |
4109 graves := GearsNear(hh^.Gear, gtGrave, Gear^.Radius); |
4111 graves := GearsNear(hh^.Gear, gtGrave, Gear^.Radius); |
4110 |
4112 |
|
4113 if Length(graves) = 0 then begin |
|
4114 Gear^.Timer := 250; |
|
4115 Gear^.doStep := @doStepIdle; |
|
4116 exit; |
|
4117 end; |
|
4118 |
4111 if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) then begin |
4119 if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) then begin |
4112 i := getRandom(Length(graves)); |
4120 i := getRandom(Length(graves)); |
4113 writeln(i); |
|
4114 dec(hh^.Gear^.Health); |
4121 dec(hh^.Gear^.Health); |
4115 inc(graves[i]^.Health); |
4122 inc(graves[i]^.Health); |
4116 {-for i:= 0 to High(graves) do begin |
4123 {-for i:= 0 to High(graves) do begin |
4117 if hh^.Gear^.Health > 0 then begin |
4124 if hh^.Gear^.Health > 0 then begin |
4118 dec(hh^.Gear^.Health); |
4125 dec(hh^.Gear^.Health); |