mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-19 06:31:26 +02:00
Fix SPRK sometimes being impossible to paste
Broken since 462460b6b3
, where Load started using create_part with p == -3, running all sorts of checks against SPRK and sometimes failing.
This commit is contained in:
@@ -1812,7 +1812,7 @@ int Simulation::create_part(int p, int x, int y, int t, int v)
|
|||||||
if (x<0 || y<0 || x>=XRES || y>=YRES || t<=0 || t>=PT_NUM || !elements[t].Enabled)
|
if (x<0 || y<0 || x>=XRES || y>=YRES || t<=0 || t>=PT_NUM || !elements[t].Enabled)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (t == PT_SPRK && !(p == -2 && elements[TYP(pmap[y][x])].CtypeDraw))
|
if (t == PT_SPRK && p != -3 && !(p == -2 && elements[TYP(pmap[y][x])].CtypeDraw))
|
||||||
{
|
{
|
||||||
int type = TYP(pmap[y][x]);
|
int type = TYP(pmap[y][x]);
|
||||||
int index = ID(pmap[y][x]);
|
int index = ID(pmap[y][x]);
|
||||||
|
Reference in New Issue
Block a user