summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2010-11-22 20:06:20 (GMT)
committer Simon <simon@hardwired.org.uk>2010-11-22 20:06:20 (GMT)
commit9684fdc377ab01d3fc956ea156a2e2b4c7edfd60 (patch)
tree6378dd7f80fb23b2a0da5401f81f9a84b3c702d7
parentb45d028585773c3295cda339ae01fae57e9ce87f (diff)
downloadpowder-9684fdc377ab01d3fc956ea156a2e2b4c7edfd60.zip
powder-9684fdc377ab01d3fc956ea156a2e2b4c7edfd60.tar.gz
Small changes
-rw-r--r--includes/powder.h1
-rw-r--r--src/powder.c18
2 files changed, 9 insertions, 10 deletions
diff --git a/includes/powder.h b/includes/powder.h
index 8f19d28..b2450d5 100644
--- a/includes/powder.h
+++ b/includes/powder.h
@@ -368,6 +368,7 @@ static part_state pstates[PT_NUM] =
/* PCLN */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* HSWC */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
/* IRON */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1687.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
+ /* MORT */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},
};
extern int isplayer;
diff --git a/src/powder.c b/src/powder.c
index d040cf8..86f0427 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -96,17 +96,15 @@ static int eval_move(int pt, int nx, int ny, unsigned *rr)
return 0;
if(r && (r&0xFF) < PT_NUM){
- //if(ptypes[pt].properties&TYPE_ENERGY && (r && ((r&0xFF) >= PT_NUM || (ptypes[(r&0xFF)].properties&TYPE_ENERGY))))
- if(ptypes[pt].properties&TYPE_ENERGY && ptypes[(r&0xFF)].properties&TYPE_ENERGY)
- return 2;
+ if(ptypes[pt].properties&TYPE_ENERGY && ptypes[(r&0xFF)].properties&TYPE_ENERGY)
+ return 2;
- //if(pt==PT_NEUT && (r && ((r&0xFF) >= PT_NUM || (ptypes[(r&0xFF)].properties&PROP_NEUTPENETRATE))))
- if(pt==PT_NEUT && ptypes[(r&0xFF)].properties&PROP_NEUTPASS)
- return 2;
- if(pt==PT_NEUT && ptypes[(r&0xFF)].properties&PROP_NEUTPENETRATE)
- return 1;
- if((r&0xFF)==PT_NEUT && ptypes[pt].properties&PROP_NEUTPENETRATE)
- return 0;
+ if(pt==PT_NEUT && ptypes[(r&0xFF)].properties&PROP_NEUTPASS)
+ return 2;
+ if(pt==PT_NEUT && ptypes[(r&0xFF)].properties&PROP_NEUTPENETRATE)
+ return 1;
+ if((r&0xFF)==PT_NEUT && ptypes[pt].properties&PROP_NEUTPENETRATE)
+ return 0;
}
if (r && ((r&0xFF) >= PT_NUM || (ptypes[pt].weight <= ptypes[(r&0xFF)].weight)))