summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex <zc00gii@gmail.com>2010-09-26 23:28:18 (GMT)
committer Alex <zc00gii@gmail.com>2010-09-26 23:28:18 (GMT)
commit1401817f212e1c4759f38bcb47e9ec8aecfe8444 (patch)
tree5fa93556e6bc2fdf38d930d74f7e2139811be3d6
parent5b9e55436092711d862ecfc4b7fcdd69d93b75f4 (diff)
downloadpowder-1401817f212e1c4759f38bcb47e9ec8aecfe8444.zip
powder-1401817f212e1c4759f38bcb47e9ec8aecfe8444.tar.gz
fixed fuse bug
-rw-r--r--powder.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/powder.c b/powder.c
index cedf3ba..16941fd 100644
--- a/powder.c
+++ b/powder.c
@@ -1021,9 +1021,6 @@ void update_particles_i(pixel *vid, int start, int inc)
}
else if(t==PT_FUSE)
{
- // I do a parts[i].life hack here, the first half bits is for the burn life, the last half bits is for the pressure life
- tempu1 = (uint16_t)(((uint32_t)parts[i].life) >> 24);
- tempu2 = (uint16_t)(((uint32_t)parts[i].life) & 0xFFFF);
if(parts[i].life<=0) {
t = PT_NONE;
kill_part(i);
@@ -1055,14 +1052,13 @@ void update_particles_i(pixel *vid, int start, int inc)
r = pmap[y+ny][x+nx];
if((r>>8)>=NPART || !r)
continue;
- if((r&0xFF)==PT_SPRK || (parts[i].temp>=(273.15+700.0f)) && 1>(rand()%20))
+ if((r&0xFF)==PT_SPRK || ((parts[i].temp>=(273.15+700.0f)) && 1>(rand()%20)))
{
if(parts[i].life>40) {
parts[i].life = 39;
}
}
}
- parts[i].life = ((uint32_t)(((uint32_t)tempu1 << 24) | (uint32_t)tempu2));
}
else if(t==PT_FSEP)
{