Permalink
Browse files

reset invalid SOAP links even when soap is frozen

fixes tpt save id:1834554
  • Loading branch information...
jacob1 committed Aug 12, 2015
1 parent 15537d4 commit 3d8f871fc7ba5a708493601ea966be6f79686388
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/simulation/elements/SOAP.cpp
@@ -102,13 +102,14 @@ int Element_SOAP::update(UPDATE_FUNC_ARGS)
if (parts[i].ctype&1)
{
// reset invalid SOAP links
if (parts[i].tmp < 0 || parts[i].tmp >= NPART || parts[i].tmp2 < 0 || parts[i].tmp2 >= NPART)
{
parts[i].tmp = parts[i].tmp2 = parts[i].ctype = 0;
return 0;
}
if (parts[i].temp>FREEZING)
{
if (parts[i].tmp < 0 || parts[i].tmp >= NPART || parts[i].tmp2 < 0 || parts[i].tmp2 >= NPART)
{
parts[i].tmp = parts[i].tmp2 = parts[i].ctype = 0;
return 0;
}
if (parts[i].life<=0)
{
//if only connected on one side

0 comments on commit 3d8f871

Please sign in to comment.