Make PHOT change its wavelength upon colliding with charged LITH (#841)
Co-authored-by: Tamás Bálint Misius <lbphacker@gmail.com>
This commit is contained in:
parent
f70f222a61
commit
23af1042b4
@ -4351,8 +4351,18 @@ killed:
|
||||
continue;
|
||||
}
|
||||
|
||||
if (TYP(r))
|
||||
parts[i].ctype &= elements[TYP(r)].PhotonReflectWavelengths;
|
||||
if (t == PT_PHOT)
|
||||
{
|
||||
auto mask = elements[TYP(r)].PhotonReflectWavelengths;
|
||||
if (TYP(r) == PT_LITH)
|
||||
{
|
||||
int wl_bin = parts[ID(r)].ctype / 4;
|
||||
if (wl_bin < 0) wl_bin = 0;
|
||||
if (wl_bin > 25) wl_bin = 25;
|
||||
mask = (0x1F << wl_bin);
|
||||
}
|
||||
parts[i].ctype &= mask;
|
||||
}
|
||||
|
||||
if (get_normal_interp(t, parts[i].x, parts[i].y, parts[i].vx, parts[i].vy, &nrx, &nry))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user