summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntB <psychogiant@hotmail.com>2010-10-14 23:07:02 (GMT)
committer AntB <psychogiant@hotmail.com>2010-10-14 23:07:02 (GMT)
commita49f81decb2d082a5fa794d4be4fd288bace247a (patch)
tree2aa373998c2cb48890b941c6a81f6bb41768ef18
parent01dcfe5a1a95c7811b9c0871d3e8761f855e5c2d (diff)
downloadpowder-a49f81decb2d082a5fa794d4be4fd288bace247a.zip
powder-a49f81decb2d082a5fa794d4be4fd288bace247a.tar.gz
Photon fix >.< getting the right weight helps
-rw-r--r--includes/powder.h4
-rw-r--r--src/powder.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/includes/powder.h b/includes/powder.h
index 290e3fb..e82a5ea 100644
--- a/includes/powder.h
+++ b/includes/powder.h
@@ -196,7 +196,7 @@ typedef struct part_state part_state;
* 2 = Light || Liquids 0-49
* 98 = Heavy || Powder 50-99
* 100 = Solid ||
- * 101 = Special (Photons, Neutrons)
+ * 101 is Neutrons, -1 = Photons
*/
static const part_type ptypes[PT_NUM] =
{
@@ -232,7 +232,7 @@ static const part_type ptypes[PT_NUM] =
{"DMND", PIXPACK(0xCCFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 186, "Diamond. Indestructable."}, //ief015 - Added diamond. Because concrete blocks are kinda pointless.
{"BMTL", PIXPACK(0x505070), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 251, "Breakable metal."},
{"BRMT", PIXPACK(0x705060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken metal."},
- {"PHOT", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 101, SC_ELEC, R_TEMP+900.0f +273.15f, 251, "Photons. Travel in straight lines."},
+ {"PHOT", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, -1, SC_ELEC, R_TEMP+900.0f +273.15f, 251, "Photons. Travel in straight lines."},
{"URAN", PIXPACK(0x707020), 0.4f, 0.01f * CFDS, 0.99f, 0.95f, 0.0f, 0.4f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 0, 1, 90, SC_NUCLEAR, R_TEMP+30.0f +273.15f, 251, "Heavy particles. Generates heat under pressure."},
{"WAX", PIXPACK(0xF0F0BB), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 10, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 44, "Wax. Melts at moderately high temperatures."},
{"MWAX", PIXPACK(0xE0E0AA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 5, 0, 0, 2, 1, 25, SC_LIQUID, R_TEMP+28.0f +273.15f, 44, "Liquid Wax."},
diff --git a/src/powder.c b/src/powder.c
index bd1779a..2cc8c3c 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -93,7 +93,9 @@ static int eval_move(int pt, int nx, int ny, unsigned *rr)
if(ptypes[pt].falldown!=1 && bmap[ny/CELL][nx/CELL]==10)
return 0;
- if (r && ((r&0xFF) >= PT_NUM || !(ptypes[pt].weight = ptypes[(r&0xFF)].weight)))
+ if (r && ((r&0xFF) >= PT_NUM ||
+ !(ptypes[pt].weight >= ptypes[(r&0xFF)].weight))
+ )
return 0;
if(pt == PT_PHOT)