# HG changeset patch # User unc0rr # Date 1301760100 -14400 # Node ID ced35a120f7c1728307da35cd3987efe049957ab # Parent 7915668502a6b55b1160f311df83aa7c7d3c4432# Parent b3bb27f4ba6b56cd88fbcbd6c0e5e20ca04b6b86 merge diff -r 7915668502a6 -r ced35a120f7c hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sat Apr 02 20:01:20 2011 +0400 +++ b/hedgewars/GSHandlers.inc Sat Apr 02 20:01:40 2011 +0400 @@ -963,30 +963,32 @@ VGear^.Angle := DxDy2Angle(-Gear^.dX, Gear^.dY); end; end; - - // Bullet trail - VGear := AddVisualGear( - hwround(CurrentHedgehog^.Gear^.X) + GetLaunchX(CurrentHedgehog^.CurAmmoType, hwSign(CurrentHedgehog^.Gear^.dX), CurrentHedgehog^.Gear^.Angle), - hwround(CurrentHedgehog^.Gear^.Y) + GetLaunchY(CurrentHedgehog^.CurAmmoType, CurrentHedgehog^.Gear^.Angle), - vgtLineTrail - ); - if VGear <> nil then - begin - // http://mantis.freepascal.org/view.php?id=17714 hits again - VGear^.dX := Gear^.X.QWordValue / SignAs(_1,_1).QWordValue; - VGear^.dY := Gear^.Y.QWordValue / SignAs(_1,_1).QWordValue; - - // reached edge of land. assume infinite beam. Extend it way out past camera - if (hwRound(Gear^.X) and LAND_WIDTH_MASK <> 0) - or (hwRound(Gear^.Y) and LAND_HEIGHT_MASK <> 0) then - begin - VGear^.dX := VGear^.dX + (CurrentHedgehog^.Gear^.dX * LAND_WIDTH).QWordValue / SignAs(_1,_1).QWordValue; - VGear^.dY := VGear^.dY + (CurrentHedgehog^.Gear^.dY * LAND_WIDTH).QWordValue / SignAs(_1,_1).QWordValue; + + if Gear^.PortalCounter = 0 then + begin + // Bullet trail + VGear := AddVisualGear( + hwround(CurrentHedgehog^.Gear^.X) + GetLaunchX(CurrentHedgehog^.CurAmmoType, hwSign(CurrentHedgehog^.Gear^.dX), CurrentHedgehog^.Gear^.Angle), + hwround(CurrentHedgehog^.Gear^.Y) + GetLaunchY(CurrentHedgehog^.CurAmmoType, CurrentHedgehog^.Gear^.Angle), + vgtLineTrail + ); + if VGear <> nil then + begin + // http://mantis.freepascal.org/view.php?id=17714 hits again + VGear^.dX := Gear^.X.QWordValue / SignAs(_1,_1).QWordValue; + VGear^.dY := Gear^.Y.QWordValue / SignAs(_1,_1).QWordValue; + + // reached edge of land. assume infinite beam. Extend it way out past camera + if (hwRound(Gear^.X) and LAND_WIDTH_MASK <> 0) + or (hwRound(Gear^.Y) and LAND_HEIGHT_MASK <> 0) then + begin + VGear^.dX := VGear^.dX + (CurrentHedgehog^.Gear^.dX * LAND_WIDTH).QWordValue / SignAs(_1,_1).QWordValue; + VGear^.dY := VGear^.dY + (CurrentHedgehog^.Gear^.dY * LAND_WIDTH).QWordValue / SignAs(_1,_1).QWordValue; + end; + + VGear^.Timer := 200; + end end; - - VGear^.Timer := 200; - end; - Gear^.doStep := @doStepShotIdle end; end;