summaryrefslogtreecommitdiff
path: root/src/simulation/elements/CBNW.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-05-30 00:36:34 (GMT)
committer jacob1 <jfu614@gmail.com>2013-05-30 00:36:34 (GMT)
commitd6d20defdebf72c2b27244a6d4bc8a757a669a59 (patch)
treea3802256a9377cf5b048a01a91a31a470be3c7c3 /src/simulation/elements/CBNW.cpp
parentcbc80de6522b5562f9490b0cdb620371f25be2f9 (diff)
parent41e369e68eac7b05f8cda312f9668942dc688aa7 (diff)
downloadpowder-d6d20defdebf72c2b27244a6d4bc8a757a669a59.zip
powder-d6d20defdebf72c2b27244a6d4bc8a757a669a59.tar.gz
Merge branch 'master' of git@github.com:FacialTurd/The-Powder-Toy.git
Diffstat (limited to 'src/simulation/elements/CBNW.cpp')
-rw-r--r--src/simulation/elements/CBNW.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simulation/elements/CBNW.cpp b/src/simulation/elements/CBNW.cpp
index 3f07730..ed01cf5 100644
--- a/src/simulation/elements/CBNW.cpp
+++ b/src/simulation/elements/CBNW.cpp
@@ -96,7 +96,7 @@ int Element_CBNW::update(UPDATE_FUNC_ARGS)
//Start explode
parts[i].tmp = rand()%25;//(rand()%100)+50;
}
- else if((sim->elements[r&0xFF].Properties&TYPE_SOLID) && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_GLAS && parts[i].tmp == 0 && (2-sim->pv[y/CELL][x/CELL])>(rand()%13333))
+ else if((sim->elements[r&0xFF].Properties&TYPE_SOLID) && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_GLAS && parts[i].tmp == 0 && (2-sim->pv[y/CELL][x/CELL])>(rand()%6667))
{
sim->part_change_type(i,x,y,PT_CO2);
parts[i].ctype = 5;
@@ -131,7 +131,7 @@ int Element_CBNW::update(UPDATE_FUNC_ARGS)
}
else if ((r&0xFF)==PT_FIRE && parts[r>>8].ctype!=PT_WATR){
sim->kill_part(r>>8);
- if(1>(rand()%50)){
+ if(!(rand()%50)){
sim->kill_part(i);
return 1;
}