summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2010-09-24 15:23:29 (GMT)
committer Simon <simon@hardwired.org.uk>2010-09-24 15:23:29 (GMT)
commit3d6e7f8f62fc2e34c1d525842dc711c3be903a20 (patch)
treee73f15ff67011901a4fc754616d7e289e8a0a058
parent6d3fe4344f6e844a0401f9381047906d2dc0813d (diff)
downloadpowder-3d6e7f8f62fc2e34c1d525842dc711c3be903a20.zip
powder-3d6e7f8f62fc2e34c1d525842dc711c3be903a20.tar.gz
Fireworks bugfixes
-rw-r--r--powder.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/powder.c b/powder.c
index d4ed908..42099fe 100644
--- a/powder.c
+++ b/powder.c
@@ -1301,7 +1301,7 @@ void update_particles_i(pixel *vid, int start, int inc)
if((r>>8)>=NPART || !r)
continue;
rt = parts[r>>8].type;
- if(rt==PT_FIRE)
+ if(rt==PT_FIRE||rt==PT_PLSM||rt==PT_THDR)
{
parts[i].tmp = 1;
parts[i].life = rand()%50+120;
@@ -1314,9 +1314,11 @@ void update_particles_i(pixel *vid, int start, int inc)
} else {
float newVel = parts[i].life/50;
parts[i].flags = parts[i].flags&0xFFFFFFFE;
- parts[i].vy = -newVel;
- ly-=newVel;
- iy-=newVel;
+ if((pmap[(int)(ly-newVel)][(int)lx]&0xFF)==PT_NONE){
+ parts[i].vy = -newVel;
+ ly-=newVel;
+ iy-=newVel;
+ }
}
}
else if(parts[i].tmp==2){
@@ -1329,10 +1331,13 @@ void update_particles_i(pixel *vid, int start, int inc)
r = pmap[y+ny][x+nx];
if((r>>8)>=NPART || !r)
continue;
- parts[r>>8].vx = (rand()%3-1)*tmul;
- parts[r>>8].vy = (rand()%3-1)*tmul;
- parts[r>>8].tmp = 3;
- parts[r>>8].life = rand()%100+100;
+ if(parts[r>>8].type==PT_FIRW){
+ parts[r>>8].vx = (rand()%3-1)*tmul;
+ parts[r>>8].vy = (rand()%3-1)*tmul;
+ parts[r>>8].tmp = 3;
+ parts[r>>8].life = rand()%100+100;
+ parts[r>>8].temp = 6000.0f;
+ }
}
}
}