summaryrefslogtreecommitdiff
path: root/src/simulation/elements
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-04 21:32:13 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-05 15:33:24 (GMT)
commita16534e78247a4a2625a95adffddb1ef38ee6b02 (patch)
tree98ad59cff8f7a69c51a5ba6bc9685b0032fc9205 /src/simulation/elements
parentd2af4470a56265155f63cd9fe54ed3e33825fac7 (diff)
downloadpowder-a16534e78247a4a2625a95adffddb1ef38ee6b02.zip
powder-a16534e78247a4a2625a95adffddb1ef38ee6b02.tar.gz
don't let TNT flood fill explode when under other particles (prevents lag)
Diffstat (limited to 'src/simulation/elements')
-rw-r--r--src/simulation/elements/BANG.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/simulation/elements/BANG.cpp b/src/simulation/elements/BANG.cpp
index 2dc660a..b0ff983 100644
--- a/src/simulation/elements/BANG.cpp
+++ b/src/simulation/elements/BANG.cpp
@@ -75,8 +75,11 @@ int Element_BANG::update(UPDATE_FUNC_ARGS)
}
else if(parts[i].tmp==1)
{
- int tempvalue = 2;
- sim->flood_prop(x, y, offsetof(Particle, tmp), &tempvalue, StructProperty::Integer);
+ if ((pmap[y][x]>>8 == i))
+ {
+ int tempvalue = 2;
+ sim->flood_prop(x, y, offsetof(Particle, tmp), &tempvalue, StructProperty::Integer);
+ }
parts[i].tmp = 2;
}
else if(parts[i].tmp==2)