It would "help" your lost bullets issue, but it will remove too much of
the realism in my opinion. Bullets will hit things when they should just graze or miss.
An idea springs to mind. Its not tested but try it.
You can see where it goes cause theres a couple of lines above and below that are unchanged...
///
//Check if still moving far enough, per frame, to call it "alive".
vec_set(lastPos, my.x);
wait(1);
//INSERT START
if(c_trace(my.x, lastPos, IGNORE_ME)) //if hit something.
{
//COMPLETELY THEORETICAL manual event-triggering (never seen or tried before)
if(you) event_type = EVENT_ENTITY; //hit an entity
else event_type = EVENT_BLOCK; //hit terrain/block
impact_mghit(); //trigger event manually
phent_clearvelocity(me); //stop bullet
vec_set(lastPos, my.x); //make it "die" this frame
}
//INSERT END
if(vec_dist(lastPos, my.x)<10) break;
}
....
NOTE: I havent implemented EVENT_IMPACT because I think the chances of this bullet
being hit by another bullet is small.
So IF you want to keep this chance, let me know and I'll update this snippet.
BUT you will need to apply "push" values to all entities then. (See "push" in manual)