mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-23 00:12:51 +02:00
Preserve GoL deco in older saves; deco on builtin GoL no longer renders when decorations are off
This commit is contained in:
@@ -1335,6 +1335,7 @@ void GameSave::readOPS(char * data, int dataLength)
|
|||||||
if (particles[newIndex].ctype >= 0 && particles[newIndex].ctype < NGOL)
|
if (particles[newIndex].ctype >= 0 && particles[newIndex].ctype < NGOL)
|
||||||
{
|
{
|
||||||
particles[newIndex].tmp2 = particles[newIndex].tmp;
|
particles[newIndex].tmp2 = particles[newIndex].tmp;
|
||||||
|
if (!particles[newIndex].dcolour)
|
||||||
particles[newIndex].dcolour = builtinGol[particles[newIndex].ctype].colour;
|
particles[newIndex].dcolour = builtinGol[particles[newIndex].ctype].colour;
|
||||||
particles[newIndex].tmp = builtinGol[particles[newIndex].ctype].colour2;
|
particles[newIndex].tmp = builtinGol[particles[newIndex].ctype].colour2;
|
||||||
}
|
}
|
||||||
@@ -1902,6 +1903,7 @@ void GameSave::readPSv(char * saveDataChar, int dataLength)
|
|||||||
particles[i-1].tmp = 0;
|
particles[i-1].tmp = 0;
|
||||||
if (particles[i-1].ctype >= 0 && particles[i-1].ctype < NGOL)
|
if (particles[i-1].ctype >= 0 && particles[i-1].ctype < NGOL)
|
||||||
{
|
{
|
||||||
|
if (!particles[i-1].dcolour)
|
||||||
particles[i-1].dcolour = builtinGol[particles[i-1].ctype].colour;
|
particles[i-1].dcolour = builtinGol[particles[i-1].ctype].colour;
|
||||||
particles[i-1].tmp = builtinGol[particles[i-1].ctype].colour2;
|
particles[i-1].tmp = builtinGol[particles[i-1].ctype].colour2;
|
||||||
}
|
}
|
||||||
|
@@ -60,7 +60,7 @@ static int graphics(GRAPHICS_FUNC_ARGS)
|
|||||||
bool renderDeco = !ren->blackDecorations;
|
bool renderDeco = !ren->blackDecorations;
|
||||||
if (ruleset >= 0 && ruleset < NGOL)
|
if (ruleset >= 0 && ruleset < NGOL)
|
||||||
{
|
{
|
||||||
if (!renderDeco)
|
if (!renderDeco || !ren->decorations_enable)
|
||||||
{
|
{
|
||||||
colour1 = builtinGol[ruleset].colour;
|
colour1 = builtinGol[ruleset].colour;
|
||||||
colour2 = builtinGol[ruleset].colour2;
|
colour2 = builtinGol[ruleset].colour2;
|
||||||
|
Reference in New Issue
Block a user