diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-07-22 19:33:36 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-07-24 12:07:15 (GMT) |
| commit | 7ed0255f04f494e914b724cf5614f4f1d343069a (patch) | |
| tree | 2949a549d709088a977905abd2f71c6193dec250 /src/powder.c | |
| parent | ae9fca86ee7dd1ea2a781dee6f2f4727ac094e2b (diff) | |
| download | powder-7ed0255f04f494e914b724cf5614f4f1d343069a.zip powder-7ed0255f04f494e914b724cf5614f4f1d343069a.tar.gz | |
Disable old life elements
Diffstat (limited to 'src/powder.c')
| -rw-r--r-- | src/powder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/powder.c b/src/powder.c index 90438f8..6167abf 100644 --- a/src/powder.c +++ b/src/powder.c @@ -616,7 +616,7 @@ inline void part_change_type(int i, int x, int y, int t)//changes the type of pa { if (x<0 || y<0 || x>=XRES || y>=YRES || i>=NPART || t<0 || t>=PT_NUM) return; - if (t==OLD_PT_WIND) + if (!ptypes[t].enabled) t = PT_NONE; parts[i].type = t; if (t==PT_PHOT || t==PT_NEUT) @@ -646,7 +646,7 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a 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)) return -1; - if (t==OLD_PT_WIND) + if (t>=0 && t<PT_NUM && !ptypes[t].enabled) return -1; if (t==SPC_HEAT||t==SPC_COOL) |
