Prevent allocation of particles with type==0
bleep bloop
This commit is contained in:
parent
10e553be03
commit
65e79b4b8f
@ -705,7 +705,7 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a
|
|||||||
int t = tv & 0xFF;
|
int t = tv & 0xFF;
|
||||||
int v = (tv >> 8) & 0xFF;
|
int v = (tv >> 8) & 0xFF;
|
||||||
|
|
||||||
if (x<0 || y<0 || x>=XRES || y>=YRES || ((t<0 || t>=PT_NUM)&&t!=SPC_HEAT&&t!=SPC_COOL&&t!=SPC_AIR&&t!=SPC_VACUUM&&t!=SPC_PGRV&&t!=SPC_NGRV))
|
if (x<0 || y<0 || x>=XRES || y>=YRES || ((t<=0 || t>=PT_NUM)&&t!=SPC_HEAT&&t!=SPC_COOL&&t!=SPC_AIR&&t!=SPC_VACUUM&&t!=SPC_PGRV&&t!=SPC_NGRV))
|
||||||
return -1;
|
return -1;
|
||||||
if (t>=0 && t<PT_NUM && !ptypes[t].enabled)
|
if (t>=0 && t<PT_NUM && !ptypes[t].enabled)
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user