summaryrefslogtreecommitdiff
path: root/src/powder.c
diff options
context:
space:
mode:
authorsavask <savask@yandex.ru>2011-04-21 02:19:44 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-05-05 19:24:21 (GMT)
commit3ea306cc771bbaefa01058c810fc1dd041a17641 (patch)
tree215bea93ce9845e94bf53f71faa85482e8ae694a /src/powder.c
parent5aefd0cb01facdda852960c03489991461aaed62 (diff)
downloadpowder-3ea306cc771bbaefa01058c810fc1dd041a17641.zip
powder-3ea306cc771bbaefa01058c810fc1dd041a17641.tar.gz
Some changes to soap.
Diffstat (limited to 'src/powder.c')
-rw-r--r--src/powder.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/powder.c b/src/powder.c
index 87389e2..8d17423 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -464,11 +464,11 @@ void kill_part(int i)//kills particle number i
}
if (parts[i].type == PT_SOAP)
{
- if (parts[i].ctype&0x02 == 0x02)
- parts[parts[i].tmp].ctype ^= 0x04;
+ if ((parts[i].ctype&2) == 2)
+ parts[parts[i].tmp].ctype ^= 4;
- if (parts[i].ctype&0x04 == 0x04)
- parts[parts[i].tmp2].ctype ^= 0x02;
+ if ((parts[i].ctype&4) == 4)
+ parts[parts[i].tmp2].ctype ^= 2;
}
if (x>=0 && y>=0 && x<XRES && y<YRES) {
if ((pmap[y][x]>>8)==i)
@@ -648,6 +648,11 @@ inline int create_part(int p, int x, int y, int t)//the function for creating a
parts[i].tmp = 0;
parts[i].tmp2 = 0;
}
+ if (t==PT_SOAP)
+ {
+ parts[i].tmp = -1;
+ parts[i].tmp2 = -1;
+ }
//now set various properties that we want at spawn.
if (t==PT_ACID)
{
@@ -1353,7 +1358,7 @@ void update_particles_i(pixel *vid, int start, int inc)
if (!(parts[i].life==10&&(t==PT_SWCH||t==PT_LCRY||t==PT_PCLN||t==PT_HSWC||t==PT_PUMP)))
parts[i].life--;
//this if is for stopping death when life hits 0
- if (parts[i].life<=0 && !(ptypes[t].properties&PROP_CONDUCTS) && t!=PT_ARAY && t!=PT_FIRW && t!=PT_SWCH && t!=PT_PCLN && t!=PT_HSWC && t!=PT_PUMP && t!=PT_SPRK && t!=PT_LAVA && t!=PT_LCRY && t!=PT_QRTZ && t!=PT_GLOW && t!= PT_FOG && t!=PT_PIPE && t!=PT_FRZW &&!(t==PT_ICEI&&parts[i].ctype==PT_FRZW)&&t!=PT_INST && t!=PT_SHLD1&& t!=PT_SHLD2&& t!=PT_SHLD3&& t!=PT_SHLD4 && t!=PT_SING)
+ if (parts[i].life<=0 && !(ptypes[t].properties&PROP_CONDUCTS) && t!=PT_SOAP && t!=PT_ARAY && t!=PT_FIRW && t!=PT_SWCH && t!=PT_PCLN && t!=PT_HSWC && t!=PT_PUMP && t!=PT_SPRK && t!=PT_LAVA && t!=PT_LCRY && t!=PT_QRTZ && t!=PT_GLOW && t!= PT_FOG && t!=PT_PIPE && t!=PT_FRZW &&!(t==PT_ICEI&&parts[i].ctype==PT_FRZW)&&t!=PT_INST && t!=PT_SHLD1&& t!=PT_SHLD2&& t!=PT_SHLD3&& t!=PT_SHLD4 && t!=PT_SING)
{
kill_part(i);
continue;