fix for fast particles moving through VOID

This commit is contained in:
jacob1 2014-11-22 13:04:04 -05:00
parent aa8fe86735
commit 6da5b08fd2

View File

@ -4364,7 +4364,10 @@ killed:
clear_y = (int)(clear_yf+0.5f); clear_y = (int)(clear_yf+0.5f);
break; break;
} }
if (!eval_move(t, fin_x, fin_y, NULL) || (t == PT_PHOT && pmap[fin_y][fin_x]) || bmap[fin_y/CELL][fin_x/CELL]==WL_DESTROYALL) //block if particle can't move (0), or some special cases where it returns 1 (can_move = 3 but returns 1 meaning particle will be eaten)
//also photons are still blocked (slowed down) by any particle (even ones it can move through), and absorb wall also blocks particles
int eval = eval_move(t, fin_x, fin_y, NULL);
if (!eval || (can_move[t][pmap[fin_y][fin_x]&0xFF] == 3 && eval == 1) || (t == PT_PHOT && pmap[fin_y][fin_x]) || bmap[fin_y/CELL][fin_x/CELL]==WL_DESTROYALL)
{ {
// found an obstacle // found an obstacle
clear_xf = fin_xf-dx; clear_xf = fin_xf-dx;