diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-08-25 21:10:24 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-08-25 21:10:24 (GMT) |
| commit | e06d68d63a78eb9f3358d61800df4e97193e3699 (patch) | |
| tree | 50f6e133eee099891559da08a69006185f36c9c0 /src/elements | |
| parent | 951a396e60e98440780acb3bb7d09350aa648e7b (diff) | |
| download | powder-e06d68d63a78eb9f3358d61800df4e97193e3699.zip powder-e06d68d63a78eb9f3358d61800df4e97193e3699.tar.gz | |
Finally, water puts out fire
Diffstat (limited to 'src/elements')
| -rw-r--r-- | src/elements/dstw.c | 7 | ||||
| -rw-r--r-- | src/elements/sltw.c | 7 | ||||
| -rw-r--r-- | src/elements/watr.c | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/src/elements/dstw.c b/src/elements/dstw.c index 7ce6c09..390896d 100644 --- a/src/elements/dstw.c +++ b/src/elements/dstw.c @@ -27,6 +27,13 @@ int update_DSTW(UPDATE_FUNC_ARGS) { part_change_type(i,x,y,PT_FIRE); parts[i].life = 4; } + if ((r&0xFF)==PT_FIRE){ + kill_part(r>>8); + if(1>(rand()%150)){ + kill_part(i); + return 1; + } + } } return 0; } diff --git a/src/elements/sltw.c b/src/elements/sltw.c index b6d18bb..ed62e40 100644 --- a/src/elements/sltw.c +++ b/src/elements/sltw.c @@ -18,6 +18,13 @@ int update_SLTW(UPDATE_FUNC_ARGS) { part_change_type(i,x,y,PT_FIRE); parts[i].life = 4; } + if ((r&0xFF)==PT_FIRE){ + kill_part(r>>8); + if(1>(rand()%150)){ + kill_part(i); + return 1; + } + } } return 0; } diff --git a/src/elements/watr.c b/src/elements/watr.c index 5810cd4..92c906d 100644 --- a/src/elements/watr.c +++ b/src/elements/watr.c @@ -19,6 +19,13 @@ int update_WATR(UPDATE_FUNC_ARGS) { part_change_type(i,x,y,PT_FIRE); parts[i].life = 4; } + if ((r&0xFF)==PT_FIRE){ + kill_part(r>>8); + if(1>(rand()%150)){ + kill_part(i); + return 1; + } + } /*if ((r&0xFF)==PT_CNCT && 1>(rand()%500)) Concrete+Water to paste, not very popular { part_change_type(i,x,y,PT_PSTE); |
