summaryrefslogtreecommitdiff
path: root/src/powder.c
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-08-29 15:34:53 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-08-29 15:34:53 (GMT)
commit26269ff052359af703c211e4d5d4a2447b45405b (patch)
tree1ec5fbda113f3c285aeef1ab1b43cc63e733e699 /src/powder.c
parent9c458b885112c28af8a3b7c7964e563692620c32 (diff)
downloadpowder-26269ff052359af703c211e4d5d4a2447b45405b.zip
powder-26269ff052359af703c211e4d5d4a2447b45405b.tar.gz
Added STOR, a block that can store a single particle and release when charged
Diffstat (limited to 'src/powder.c')
-rw-r--r--src/powder.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/powder.c b/src/powder.c
index 4f763a3..3b76a5d 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -752,6 +752,7 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a
if (pmap[y][x])
{
if ((
+ (pmap[y][x]&0xFF)==PT_STOR||
(pmap[y][x]&0xFF)==PT_CLNE||
(pmap[y][x]&0xFF)==PT_BCLN||
((pmap[y][x]&0xFF)==PT_PCLN&&t!=PT_PSCN&&t!=PT_NSCN)||
@@ -759,11 +760,12 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a
)&&(
t!=PT_CLNE&&t!=PT_PCLN&&
t!=PT_BCLN&&t!=PT_STKM&&
- t!=PT_STKM2&&t!=PT_PBCN)
+ t!=PT_STKM2&&t!=PT_PBCN&&
+ t!=PT_STOR)
)
{
parts[pmap[y][x]>>8].ctype = t;
- if (t==PT_LIFE && v<NGOLALT) parts[pmap[y][x]>>8].tmp = v;
+ if (t==PT_LIFE && v<NGOLALT && (pmap[y][x]&0xFF)!=PT_STOR) parts[pmap[y][x]>>8].tmp = v;
}
return -1;
}