mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-01 12:02:40 +02:00
reset invalid SOAP links even when soap is frozen
fixes tpt save id:1834554
This commit is contained in:
@@ -102,13 +102,14 @@ int Element_SOAP::update(UPDATE_FUNC_ARGS)
|
|||||||
|
|
||||||
if (parts[i].ctype&1)
|
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].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 (parts[i].life<=0)
|
||||||
{
|
{
|
||||||
//if only connected on one side
|
//if only connected on one side
|
||||||
|
Reference in New Issue
Block a user