Add inverted element filtering to CONV with tmp2 set to 1 (#871)

This commit is contained in:
Jakav-N 2022-12-07 04:43:21 -07:00 committed by GitHub
parent 34fa5d0cce
commit 0e361c170c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -2305,7 +2305,8 @@ void GameView::OnDraw()
// 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
|| 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 << ", Pressure: " << sample.AirPressure;

View File

@ -81,9 +81,9 @@ static int update(UPDATE_FUNC_ARGS)
if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES)
{
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];
if (!r || (restrictElement && TYP(r) != restrictElement))
if (!r || (restrictElement && ((TYP(r) == restrictElement) == (parts[i].tmp2 == 1))))
continue;
if (TYP(r) != PT_CONV && TYP(r) != PT_DMND && TYP(r) != ctype)
{