mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 11:19:51 +02:00
Enabled check for PIPE too
This commit is contained in:
@@ -2071,7 +2071,7 @@ void GameView::OnDraw()
|
|||||||
{
|
{
|
||||||
if (sample.particle.type == PT_LAVA && c->IsValidElement(ctype))
|
if (sample.particle.type == PT_LAVA && c->IsValidElement(ctype))
|
||||||
sampleInfo << "Molten " << c->ElementResolve(ctype, -1);
|
sampleInfo << "Molten " << c->ElementResolve(ctype, -1);
|
||||||
else if ((sample.particle.type == PT_PIPE || sample.particle.type == PT_PPIP) && ctype > 0 && ctype < PT_NUM)
|
else if ((sample.particle.type == PT_PIPE || sample.particle.type == PT_PPIP) && c->IsValidElement(ctype))
|
||||||
sampleInfo << c->ElementResolve(sample.particle.type, -1) << " with " << c->ElementResolve(ctype, (int)sample.particle.pavg[1]);
|
sampleInfo << c->ElementResolve(sample.particle.type, -1) << " with " << c->ElementResolve(ctype, (int)sample.particle.pavg[1]);
|
||||||
else if (sample.particle.type == PT_LIFE)
|
else if (sample.particle.type == PT_LIFE)
|
||||||
sampleInfo << c->ElementResolve(sample.particle.type, sample.particle.ctype);
|
sampleInfo << c->ElementResolve(sample.particle.type, sample.particle.ctype);
|
||||||
|
@@ -71,6 +71,8 @@ int Element_PIPE::update(UPDATE_FUNC_ARGS)
|
|||||||
{
|
{
|
||||||
int r, rx, ry, np;
|
int r, rx, ry, np;
|
||||||
int rnd, rndstore;
|
int rnd, rndstore;
|
||||||
|
if ((parts[i].tmp&0xFF)>=PT_NUM || !sim->elements[parts[i].tmp&0xFF].Enabled)
|
||||||
|
parts[i].tmp &= ~0xFF;
|
||||||
if (parts[i].tmp & PPIP_TMPFLAG_TRIGGERS)
|
if (parts[i].tmp & PPIP_TMPFLAG_TRIGGERS)
|
||||||
{
|
{
|
||||||
int pause_changed = 0;
|
int pause_changed = 0;
|
||||||
@@ -285,7 +287,7 @@ int Element_PIPE::update(UPDATE_FUNC_ARGS)
|
|||||||
//#TPT-Directive ElementHeader Element_PIPE static int graphics(GRAPHICS_FUNC_ARGS)
|
//#TPT-Directive ElementHeader Element_PIPE static int graphics(GRAPHICS_FUNC_ARGS)
|
||||||
int Element_PIPE::graphics(GRAPHICS_FUNC_ARGS)
|
int Element_PIPE::graphics(GRAPHICS_FUNC_ARGS)
|
||||||
{
|
{
|
||||||
if ((cpart->tmp&0xFF)>0 && (cpart->tmp&0xFF)<PT_NUM)
|
if ((cpart->tmp&0xFF)>0 && (cpart->tmp&0xFF)<PT_NUM && ren->sim->elements[(cpart->tmp&0xFF)].Enabled)
|
||||||
{
|
{
|
||||||
//Create a temp. particle and do a subcall.
|
//Create a temp. particle and do a subcall.
|
||||||
Particle tpart;
|
Particle tpart;
|
||||||
|
Reference in New Issue
Block a user