3633 // end of list? |
3633 // end of list? |
3634 if iterator = nil then |
3634 if iterator = nil then |
3635 break; |
3635 break; |
3636 |
3636 |
3637 // don't port portals or other gear that wouldn't make sense |
3637 // don't port portals or other gear that wouldn't make sense |
3638 if (iterator^.Kind in [gtPortal, gtRope, gtAirAttack]) |
3638 if (iterator^.Kind in [gtPortal, gtRope, gtAirAttack, gtIceGun]) |
3639 or (iterator^.PortalCounter > 32) then |
3639 or (iterator^.PortalCounter > 32) then |
3640 continue; |
3640 continue; |
3641 |
3641 |
3642 // don't port hogs on rope |
3642 // don't port hogs on rope |
3643 // TODO: this will also prevent hogs while falling after rope use from |
3643 // TODO: this will also prevent hogs while falling after rope use from |
4582 end; |
4582 end; |
4583 |
4583 |
4584 if CheckLandValue(hwRound(Gear^.X + Gear^.dX + SignAs(_6,Gear^.dX)), hwRound(Gear^.Y + _1_9) |
4584 if CheckLandValue(hwRound(Gear^.X + Gear^.dX + SignAs(_6,Gear^.dX)), hwRound(Gear^.Y + _1_9) |
4585 , lfIndestructible) then |
4585 , lfIndestructible) then |
4586 begin |
4586 begin |
4587 Gear^.X := Gear^.X + Gear^.dX; |
4587 //Gear^.X := Gear^.X + Gear^.dX; |
4588 Gear^.Y := Gear^.Y + _1_9; |
4588 Gear^.Y := Gear^.Y + _1_9 |
4589 end; |
4589 end; |
4590 end; |
4590 end; |
4591 if TestCollisionYwithGear(Gear, 1) <> 0 then |
4591 if TestCollisionYwithGear(Gear, 1) <> 0 then |
4592 begin |
4592 begin |
4593 Gear^.dY := _0; |
4593 Gear^.dY := _0; |
4594 SetLittle(HitGear^.dX); |
4594 SetLittle(HitGear^.dX); |
4595 HitGear^.dY := _0; |
4595 HitGear^.dY := _0; |
4596 end |
4596 end |
4597 else |
4597 else |
4598 begin |
4598 begin |
4599 Gear^.dY := Gear^.dY + cGravity; |
4599 //Gear^.dY := Gear^.dY + cGravity; |
4600 Gear^.Y := Gear^.Y + Gear^.dY; |
4600 //Gear^.Y := Gear^.Y + Gear^.dY; |
4601 if hwRound(Gear^.Y) > cWaterLine then |
4601 if hwRound(Gear^.Y) > cWaterLine then |
4602 Gear^.Timer := 1 |
4602 Gear^.Timer := 1 |
4603 end; |
4603 end; |
4604 |
4604 |
4605 Gear^.X := Gear^.X + HitGear^.dX; |
4605 //Gear^.X := Gear^.X + HitGear^.dX; |
4606 HitGear^.X := Gear^.X; |
4606 HitGear^.X := Gear^.X; |
|
4607 HitGear^.Y := Gear^.Y; |
4607 SetLittle(HitGear^.dY); |
4608 SetLittle(HitGear^.dY); |
4608 HitGear^.Active:= true; |
4609 HitGear^.Active:= true; |
4609 end; |
4610 end; |
4610 |
4611 |
4611 procedure doStepHammerHit(Gear: PGear); |
4612 procedure doStepHammerHit(Gear: PGear); |