equal
deleted
inserted
replaced
169 //////////////////////////////////////////////////////////////////////////////// |
169 //////////////////////////////////////////////////////////////////////////////// |
170 procedure doStepGrave(Gear: PGear); |
170 procedure doStepGrave(Gear: PGear); |
171 begin |
171 begin |
172 AllInactive:= false; |
172 AllInactive:= false; |
173 if Gear.dY < 0 then |
173 if Gear.dY < 0 then |
174 if TestCollisionYwithGear(Gear, -1) then Gear.dY:= 0; |
174 if TestCollisionY(Gear, -1) then Gear.dY:= 0; |
175 |
175 |
176 if Gear.dY >=0 then |
176 if Gear.dY >=0 then |
177 if TestCollisionYwithGear(Gear, 1) then |
177 if TestCollisionY(Gear, 1) then |
178 begin |
178 begin |
179 Gear.dY:= - Gear.dY * Gear.Elasticity; |
179 Gear.dY:= - Gear.dY * Gear.Elasticity; |
180 if Gear.dY > - 0.001 then |
180 if Gear.dY > - 0.001 then |
181 begin |
181 begin |
182 Gear.Active:= false; |
182 Gear.Active:= false; |
506 Gear.X:= Gear.X + Gear.dX; |
506 Gear.X:= Gear.X + Gear.dX; |
507 Gear.Y:= Gear.Y + Gear.dY; |
507 Gear.Y:= Gear.Y + Gear.dY; |
508 Gear.Elasticity:= Gear.Elasticity + 1.0; |
508 Gear.Elasticity:= Gear.Elasticity + 1.0; |
509 HHGear:= PHedgehog(Gear.Hedgehog)^.Gear; |
509 HHGear:= PHedgehog(Gear.Hedgehog)^.Gear; |
510 if (HHGear.State and gstFalling) <> 0 then |
510 if (HHGear.State and gstFalling) <> 0 then |
511 if HHTestCollisionYwithGear(HHGear, 1) then |
511 if TestCollisionYwithGear(HHGear, 1) then |
512 begin |
512 begin |
513 HHGear.dY:= 0; |
513 HHGear.dY:= 0; |
514 CheckHHDamage(HHGear); |
514 CheckHHDamage(HHGear); |
515 HHGear.State:= HHGear.State and not (gstFalling or gstHHJumping); |
515 HHGear.State:= HHGear.State and not (gstFalling or gstHHJumping); |
516 end else |
516 end else |