summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-12 17:46:24 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-12 17:46:24 (GMT)
commitefa0e5d0d6697612f3f08ff7d6068bd41b84630b (patch)
treeda2ff7a114b1ef221d7248febd5dedea76c0f7a0 /src/simulation
parent48459fc40d628d5701270f630afb1f8228cdfcae (diff)
downloadpowder-efa0e5d0d6697612f3f08ff7d6068bd41b84630b.zip
powder-efa0e5d0d6697612f3f08ff7d6068bd41b84630b.tar.gz
TPT Fix infinite loop when trying to detach soap with extra ctype bits set eb0b2f9ca3
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/elements/SOAP.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/simulation/elements/SOAP.cpp b/src/simulation/elements/SOAP.cpp
index f122c1f..f66334e 100644
--- a/src/simulation/elements/SOAP.cpp
+++ b/src/simulation/elements/SOAP.cpp
@@ -64,13 +64,13 @@ int Element_SOAP::update(UPDATE_FUNC_ARGS)
{
if (parts[i].life<=0)
{
- if ((parts[i].ctype&6) != 6 && parts[i].ctype>1)
+ if ((parts[i].ctype&6) != 6 && (parts[i].ctype&6))
{
int target;
target = i;
- while((parts[target].ctype&6) != 6 && parts[target].ctype>1)
+ while((parts[target].ctype&6) != 6 && (parts[target].ctype&6))
{
if ((parts[target].ctype&2) == 2)
{
@@ -282,4 +282,4 @@ int Element_SOAP::update(UPDATE_FUNC_ARGS)
}
-Element_SOAP::~Element_SOAP() {} \ No newline at end of file
+Element_SOAP::~Element_SOAP() {}