An effective limiting algorithm for particle-based numerical simulations of compressible flows