summaryrefslogtreecommitdiff
path: root/src/elements/O2.c
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2011-04-10 10:38:29 (GMT)
committer Simon <simon@hardwired.org.uk>2011-04-10 10:38:29 (GMT)
commit422fcc68ec91e8d2239e5267c5a583256920fc67 (patch)
tree9ae37003f0b2736fb04d332a7f6f10ab18ad81d8 /src/elements/O2.c
parent00d8af2404a6ec0747ce4c90c6cb949d7665bff4 (diff)
downloadpowder-422fcc68ec91e8d2239e5267c5a583256920fc67.zip
powder-422fcc68ec91e8d2239e5267c5a583256920fc67.tar.gz
Better Oxygen/Hydrogen burning
Diffstat (limited to 'src/elements/O2.c')
-rw-r--r--src/elements/O2.c34
1 files changed, 4 insertions, 30 deletions
diff --git a/src/elements/O2.c b/src/elements/O2.c
index 2d7aff0..be5da42 100644
--- a/src/elements/O2.c
+++ b/src/elements/O2.c
@@ -13,39 +13,13 @@ int update_O2(UPDATE_FUNC_ARGS)
if ((r&0xFF)==PT_FIRE)
{
- parts[r>>8].life+=(rand()/(RAND_MAX/100))*2;
parts[r>>8].temp+=(rand()/(RAND_MAX/100));
- parts[i].tmp++;
+ parts[r>>8].tmp |= 2;
+ create_part(i,x,y,PT_FIRE);
+ parts[i].temp+=(rand()/(RAND_MAX/100));
+ parts[i].tmp |= 2;
}
}
-
- if (pv[y/CELL][x/CELL] > 8.0f)
- {
- for (rx=-2; rx<3; rx++)
- for (ry=-2; ry<3; ry++)
- if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES && (rx || ry))
- {
- r = pmap[y+ry][x+rx];
- if ((r>>8)>=NPART || !r)
- continue;
- if ((r&0xFF)==PT_H2)
- {
- part_change_type(r>>8,x+rx,y+ry,PT_WATR);
- if (50<(rand()/(RAND_MAX/100))) {
- part_change_type(i,x,y,PT_WATR);
- rx = ry = 3;
- }
- }
- }
- }
-
-
- if (parts[i].tmp>=50)
- {
- create_part(i,x,y,PT_FIRE);
- parts[i].life+=(rand()/(RAND_MAX/100))+50;
- parts[i].temp+=(rand()/(RAND_MAX/100));
- }
return 0;
}