equal
deleted
inserted
replaced
714 begin |
714 begin |
715 DeleteGear(Gear); |
715 DeleteGear(Gear); |
716 exit |
716 exit |
717 end; |
717 end; |
718 Gear^.Pos:= 0; |
718 Gear^.Pos:= 0; |
719 Gear^.X:= int2hwFloat(GetRandom(snowRight-snowLeft)+snowLeft); |
719 Gear^.X:= int2hwFloat(LongInt(GetRandom(snowRight - snowLeft)) + snowLeft); |
720 Gear^.Y:= int2hwFloat(LAND_HEIGHT-1300+(GetRandom(50)-25)); |
720 Gear^.Y:= int2hwFloat(LongInt(LAND_HEIGHT + GetRandom(50)) - 1325); |
721 Gear^.State:= Gear^.State or gstInvisible; |
721 Gear^.State:= Gear^.State or gstInvisible; |
722 end |
722 end |
723 end; |
723 end; |
724 |
724 |
725 //////////////////////////////////////////////////////////////////////////////// |
725 //////////////////////////////////////////////////////////////////////////////// |
3722 ny.isNegative := not ny.isNegative; |
3722 ny.isNegative := not ny.isNegative; |
3723 |
3723 |
3724 // calc gear offset in portal normal vector direction |
3724 // calc gear offset in portal normal vector direction |
3725 noffs:= (nx * ox + ny * oy); |
3725 noffs:= (nx * ox + ny * oy); |
3726 |
3726 |
3727 if isBullet and (noffs.Round >= Gear^.Radius) then |
3727 if isBullet and (noffs.Round >= Longword(Gear^.Radius)) then |
3728 continue; |
3728 continue; |
3729 |
3729 |
3730 // avoid gravity related loops of not really moving gear |
3730 // avoid gravity related loops of not really moving gear |
3731 if not (iscake or isbullet) |
3731 if not (iscake or isbullet) |
3732 and (Gear^.dY.isNegative) |
3732 and (Gear^.dY.isNegative) |
4652 exit; |
4652 exit; |
4653 end; |
4653 end; |
4654 |
4654 |
4655 if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) and (TurnTimeLeft > 0) then |
4655 if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) and (TurnTimeLeft > 0) then |
4656 begin |
4656 begin |
4657 if graves.size <= Gear^.Tag then Gear^.Tag:= 0; |
4657 if LongInt(graves.size) <= Gear^.Tag then Gear^.Tag:= 0; |
4658 dec(hh^.Gear^.Health); |
4658 dec(hh^.Gear^.Health); |
4659 if (hh^.Gear^.Health = 0) and (hh^.Gear^.Damage = 0) then |
4659 if (hh^.Gear^.Health = 0) and (hh^.Gear^.Damage = 0) then |
4660 hh^.Gear^.Damage:= 1; |
4660 hh^.Gear^.Damage:= 1; |
4661 RenderHealth(hh^); |
4661 RenderHealth(hh^); |
4662 RecountTeamHealth(hh^.Team); |
4662 RecountTeamHealth(hh^.Team); |