From 69e7dadcdf5daaddd663e67c54cc8dbd4a62eb0f Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 17 Apr 2012 16:36:27 +0100 Subject: [PATCH] TPT: Make RBDM/WATR explosion work again, by not killing fire created by WATR 32c9ff3099 --- src/elements/cbnw.cpp | 3 ++- src/elements/watr.cpp | 3 ++- src/elements/wtrv.cpp | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/elements/cbnw.cpp b/src/elements/cbnw.cpp index 37625b06d..b480ed558 100644 --- a/src/elements/cbnw.cpp +++ b/src/elements/cbnw.cpp @@ -76,8 +76,9 @@ int update_CBNW(UPDATE_FUNC_ARGS) { { sim->part_change_type(i,x,y,PT_FIRE); parts[i].life = 4; + parts[i].ctype = PT_WATR; } - if ((r&0xFF)==PT_FIRE){ + if ((r&0xFF)==PT_FIRE && parts[r>>8].ctype!=PT_WATR){ sim->kill_part(r>>8); if(1>(rand()%150)){ sim->kill_part(i); diff --git a/src/elements/watr.cpp b/src/elements/watr.cpp index 9451a8298..f6a99339e 100644 --- a/src/elements/watr.cpp +++ b/src/elements/watr.cpp @@ -18,8 +18,9 @@ int update_WATR(UPDATE_FUNC_ARGS) { { sim->part_change_type(i,x,y,PT_FIRE); parts[i].life = 4; + parts[i].ctype = PT_WATR; } - if ((r&0xFF)==PT_FIRE){ + if ((r&0xFF)==PT_FIRE && parts[r>>8].ctype!=PT_WATR){ sim->kill_part(r>>8); if(1>(rand()%150)){ sim->kill_part(i); diff --git a/src/elements/wtrv.cpp b/src/elements/wtrv.cpp index 2e3838ae5..9c07e9fd1 100644 --- a/src/elements/wtrv.cpp +++ b/src/elements/wtrv.cpp @@ -13,6 +13,7 @@ int update_WTRV(UPDATE_FUNC_ARGS) { { sim->part_change_type(i,x,y,PT_FIRE); parts[i].life = 4; + parts[i].ctype = PT_WATR; } } if(parts[i].temp>1273&&parts[i].ctype==PT_FIRE)