mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-10 18:34:21 +02:00
Add inverted element filtering to CONV with tmp2 set to 1 (#871)
This commit is contained in:
@@ -2305,7 +2305,8 @@ void GameView::OnDraw()
|
|||||||
// only elements that use .tmp2 show it in the debug HUD
|
// only elements that use .tmp2 show it in the debug HUD
|
||||||
if (type == PT_CRAY || type == PT_DRAY || type == PT_EXOT || type == PT_LIGH || type == PT_SOAP || type == PT_TRON
|
if (type == PT_CRAY || type == PT_DRAY || type == PT_EXOT || type == PT_LIGH || type == PT_SOAP || type == PT_TRON
|
||||||
|| type == PT_VIBR || type == PT_VIRS || type == PT_WARP || type == PT_LCRY || type == PT_CBNW || type == PT_TSNS
|
|| type == PT_VIBR || type == PT_VIRS || type == PT_WARP || type == PT_LCRY || type == PT_CBNW || type == PT_TSNS
|
||||||
|| type == PT_DTEC || type == PT_LSNS || type == PT_PSTN || type == PT_LDTC || type == PT_VSNS || type == PT_LITH)
|
|| type == PT_DTEC || type == PT_LSNS || type == PT_PSTN || type == PT_LDTC || type == PT_VSNS || type == PT_LITH
|
||||||
|
|| type == PT_CONV)
|
||||||
sampleInfo << ", Tmp2: " << sample.particle.tmp2;
|
sampleInfo << ", Tmp2: " << sample.particle.tmp2;
|
||||||
|
|
||||||
sampleInfo << ", Pressure: " << sample.AirPressure;
|
sampleInfo << ", Pressure: " << sample.AirPressure;
|
||||||
|
@@ -81,9 +81,9 @@ static int update(UPDATE_FUNC_ARGS)
|
|||||||
if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES)
|
if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES)
|
||||||
{
|
{
|
||||||
r = sim->photons[y+ry][x+rx];
|
r = sim->photons[y+ry][x+rx];
|
||||||
if (!r || (restrictElement && TYP(r) != restrictElement))
|
if (!r || (restrictElement && ((TYP(r) == restrictElement) == (parts[i].tmp2 == 1))))
|
||||||
r = pmap[y+ry][x+rx];
|
r = pmap[y+ry][x+rx];
|
||||||
if (!r || (restrictElement && TYP(r) != restrictElement))
|
if (!r || (restrictElement && ((TYP(r) == restrictElement) == (parts[i].tmp2 == 1))))
|
||||||
continue;
|
continue;
|
||||||
if (TYP(r) != PT_CONV && TYP(r) != PT_DMND && TYP(r) != ctype)
|
if (TYP(r) != PT_CONV && TYP(r) != PT_DMND && TYP(r) != ctype)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user