summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/console.c5
-rw-r--r--src/powder.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/console.c b/src/console.c
index e926328..26a0723 100644
--- a/src/console.c
+++ b/src/console.c
@@ -11,6 +11,11 @@ int file_script = 0;
int console_parse_type(char *txt, int *element, char *err)
{
int i = -1;
+ if (strcasecmp(txt,"WIND")==0)
+ {
+ strcpy(err, "Particle type not recognised");
+ return 0;
+ }
// alternative names for some elements
if (strcasecmp(txt,"C4")==0) i = PT_PLEX;
else if (strcasecmp(txt,"C5")==0) i = PT_C5;
diff --git a/src/powder.c b/src/powder.c
index 5c3a6d9..3f5898e 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -568,6 +568,8 @@ 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)
+ t = PT_NONE;
parts[i].type = t;
if (t==PT_PHOT || t==PT_NEUT)
{
@@ -593,6 +595,8 @@ inline int create_part(int p, int x, int y, int t)//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)
+ return -1;
if (t==SPC_HEAT||t==SPC_COOL)
{