Add FILT tmp2 modes

This commit is contained in:
Ksawi 2023-02-01 13:31:21 +01:00 committed by GitHub
parent b7a6663e08
commit 07f0e868a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -107,7 +107,10 @@ static int update(UPDATE_FUNC_ARGS)
ny = y+ry; ny = y+ry;
while (TYP(r)==PT_FILT) while (TYP(r)==PT_FILT)
{ {
parts[ID(r)].ctype = photonWl; if (parts[ID(r)].tmp2 == 0)
parts[ID(r)].ctype = photonWl;
else if (parts[ID(r)].tmp2 != 1)
break;
nx += rx; nx += rx;
ny += ry; ny += ry;
if (nx<0 || ny<0 || nx>=XRES || ny>=YRES) if (nx<0 || ny<0 || nx>=XRES || ny>=YRES)

View File

@ -154,7 +154,10 @@ static int update(UPDATE_FUNC_ARGS)
parts[ID(rr)].ctype; parts[ID(rr)].ctype;
while (TYP(r) == PT_FILT) while (TYP(r) == PT_FILT)
{ {
parts[ID(r)].ctype = photonWl; if (parts[ID(r)].tmp2 == 0)
parts[ID(r)].ctype = photonWl;
else if (parts[ID(r)].tmp2 != 1)
break;
nx += rx; nx += rx;
ny += ry; ny += ry;
if (nx < 0 || ny < 0 || nx >= XRES || ny >= YRES) if (nx < 0 || ny < 0 || nx >= XRES || ny >= YRES)