Fix EXOT freezing upon failing to replicate a neighbour

This commit is contained in:
Tamás Bálint Misius 2021-03-05 21:54:00 +01:00
parent 0ed6a84ecf
commit c7619387ac
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -101,8 +101,10 @@ static int update(UPDATE_FUNC_ARGS)
if (parts[i].tmp > 245 && parts[i].life > 1337)
if (rt!=PT_EXOT && rt!=PT_BREC && rt!=PT_DMND && rt!=PT_CLNE && rt!=PT_PRTI && rt!=PT_PRTO && rt!=PT_PCLN && rt!=PT_VOID && rt!=PT_NBHL && rt!=PT_WARP)
{
sim->create_part(i, x, y, rt);
return 1;
if (sim->create_part(i, x, y, rt) != -1)
{
return 1;
}
}
}
@ -166,8 +168,10 @@ static int update(UPDATE_FUNC_ARGS)
{
if (parts[i].temp < 50.0f)
{
sim->create_part(i, x, y, PT_CFLM);
return 1;
if (sim->create_part(i, x, y, PT_CFLM) != -1) // I don't see how this could fail but whatever
{
return 1;
}
}
else
parts[i].temp -= 1.0f;