# HG changeset patch # User alfadur # Date 1536698967 -7200 # Node ID 8a7699ccb6086dcdbc86644905fb6462b9903808 # Parent 506cca5a48cb8f1d57bbf5f109cb0aac419651d5 Only show bullet hits for shovable gears Fixes some weird bullet hit vgears spawning when hitting non-shovable gears like snowflakes diff -r 506cca5a48cb -r 8a7699ccb608 hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Tue Sep 11 22:44:32 2018 +0200 +++ b/hedgewars/uGearsUtils.pas Tue Sep 11 22:49:27 2018 +0200 @@ -1332,18 +1332,9 @@ if (Gear^.State and gstNoDamage) = 0 then begin - if (not (Gear^.Kind in [gtMinigun, gtPortal])) and - (Ammo^.Kind in [gtDEagleShot, gtSniperRifleShot, gtMinigunBullet]) then - begin - VGear := AddVisualGear(t^.cX[i], t^.cY[i], vgtBulletHit); - if VGear <> nil then - VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY); - end; - if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then Gear^.FlightTime:= 1; - case Gear^.Kind of gtHedgehog, gtMine, @@ -1355,6 +1346,12 @@ gtExplosives: //, //gtStructure: begin + if Ammo^.Kind in [gtDEagleShot, gtSniperRifleShot, gtMinigunBullet] then + begin + VGear := AddVisualGear(t^.cX[i], t^.cY[i], vgtBulletHit); + if VGear <> nil then + VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY); + end; if (Ammo^.Kind = gtDrill) then begin Ammo^.Timer:= 0;