First off, when using function, ALWAYS make your variables you intend to keep throughout the code, GLOBAL, else they may be overwritten very easily.
Second point, would be to use Types instead of an array if you know how to use them.
Thirdly, onto your code. I see no real need to make your bullets stick into the ground :o) But, i reckon your entityRadius is probably too big, in relation to your bullet size. By default the entityradius is set to 1, so if your bullet is pretty small, then it probably will get stuck on alot of things.
Try setting all your bullet radius to something very small, like 0.1 or smaller, and see if the problem still occurs.
Again though, i would have your bullet stuck in the ground. Each bullet you create, is going to be a seperate surface, and even if the polygon count isn't high, 100 surfaces or bullets will slow your graphics updates down a fair bit.
Second point, would be to use Types instead of an array if you know how to use them.
Thirdly, onto your code. I see no real need to make your bullets stick into the ground :o) But, i reckon your entityRadius is probably too big, in relation to your bullet size. By default the entityradius is set to 1, so if your bullet is pretty small, then it probably will get stuck on alot of things.
Try setting all your bullet radius to something very small, like 0.1 or smaller, and see if the problem still occurs.
Again though, i would have your bullet stuck in the ground. Each bullet you create, is going to be a seperate surface, and even if the polygon count isn't high, 100 surfaces or bullets will slow your graphics updates down a fair bit.