From 1401817f212e1c4759f38bcb47e9ec8aecfe8444 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 26 Sep 2010 19:28:18 -0400 Subject: [PATCH] fixed fuse bug --- powder.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/powder.c b/powder.c index cedf3bae1..16941fd9a 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) {