In several levels are red gas canisters with a small pilot light on them. These can be pushed easily by walking into them. Get behind the smart gun and push it as close as possible, then strike it once with a heavy attack (should be a tail strike). You will have a small amount of time to flee before it explodes, disabling the smart gun