mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-21 07:31:26 +02:00
Don't show GoL .tmp in HUD, check if create_part was successful while simulating GoL
This commit is contained in:
@@ -2191,7 +2191,7 @@ void GameView::OnDraw()
|
|||||||
}
|
}
|
||||||
sampleInfo << ", Temp: " << (sample.particle.temp - 273.15f) << " C";
|
sampleInfo << ", Temp: " << (sample.particle.temp - 273.15f) << " C";
|
||||||
sampleInfo << ", Life: " << sample.particle.life;
|
sampleInfo << ", Life: " << sample.particle.life;
|
||||||
if (sample.particle.type != PT_RFRG && sample.particle.type != PT_RFGL)
|
if (sample.particle.type != PT_RFRG && sample.particle.type != PT_RFGL && sample.particle.type != PT_LIFE)
|
||||||
{
|
{
|
||||||
if (sample.particle.type == PT_CONV)
|
if (sample.particle.type == PT_CONV)
|
||||||
{
|
{
|
||||||
|
@@ -4947,6 +4947,8 @@ void Simulation::SimulateGoL()
|
|||||||
{
|
{
|
||||||
// * 0x200000: No need to look for colours, they'll be set later anyway.
|
// * 0x200000: No need to look for colours, they'll be set later anyway.
|
||||||
int i = create_part(-1, x, y, PT_LIFE, golnumToCreate | 0x200000);
|
int i = create_part(-1, x, y, PT_LIFE, golnumToCreate | 0x200000);
|
||||||
|
if (i >= 0)
|
||||||
|
{
|
||||||
int xx = (createFromEntry >> 24) & 3;
|
int xx = (createFromEntry >> 24) & 3;
|
||||||
int yy = (createFromEntry >> 26) & 3;
|
int yy = (createFromEntry >> 26) & 3;
|
||||||
if (xx == 3) xx = -1;
|
if (xx == 3) xx = -1;
|
||||||
@@ -4959,6 +4961,7 @@ void Simulation::SimulateGoL()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (int l = 0; l < 5 && neighbourList[l]; ++l)
|
for (int l = 0; l < 5 && neighbourList[l]; ++l)
|
||||||
{
|
{
|
||||||
neighbourList[l] = 0;
|
neighbourList[l] = 0;
|
||||||
|
Reference in New Issue
Block a user