The anti-submarine mortar you are referring to is called the Hedgehog mortar. It was first developed by the British during World War II as a defense against German U-boats. The Hedgehog mortar fired large groups of projectiles, each containing a small explosive charge, ahead of the charging ship. When the torpedoes passed through these clouds of explosive projectiles, the torpedoes would detonate, often causing serious damage to the attacking submarine.