Skip to content

Commit

Permalink
reset invalid SOAP links even when soap is frozen
Browse files Browse the repository at this point in the history
fixes tpt save id:1834554
  • Loading branch information
jacob1 committed Aug 12, 2015
1 parent 15537d4 commit 3d8f871
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/simulation/elements/SOAP.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 3d8f871

Please sign in to comment.