Disable the fun module and run the script below.
The server will crash with "bad entity in index of edict".
But it will not crash if fun module is enabled.
Code:
#include <amxmodx>
#include <fakemeta>
public plugin_init() {
register_plugin("tr_phit_bug_part2", "0.1", "VEN")
register_forward(FM_TraceLine, "forward_trace_line")
}
public forward_trace_line(Float:start[3], Float:dest[3], ignore_monsters, skip_ent, ptr) {
if (!is_user_alive(skip_ent))
return FMRES_IGNORED
new phit = get_tr2(ptr, TR_pHit)
if (!is_user_alive(phit))
return FMRES_IGNORED
return FMRES_IGNORED
}