eval_move in create_part if a particle already exists in the requested position

To allow Lua tpt.create to create photons in glass
This commit is contained in:
jacksonmj 2012-01-04 22:09:05 +08:00 committed by Simon Robertshaw
parent 6bd8c4c3cd
commit 56b45c982b

View File

@ -791,7 +791,7 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a
return -1;
if (p==-1)//creating from anything but brush
{
if (pmap[y][x] || (bmap[y/CELL][x/CELL] && !eval_move(t, x, y, NULL)))
if ((pmap[y][x] || bmap[y/CELL][x/CELL]) && !eval_move(t, x, y, NULL))
{
if ((pmap[y][x]&0xFF)!=PT_SPAWN&&(pmap[y][x]&0xFF)!=PT_SPAWN2)
{