Fix ELEC being put into pmap instead of photons
This commit is contained in:
parent
2d1c5696a4
commit
5a3faa0584
@ -236,7 +236,7 @@ int try_move(int i, int x, int y, int nx, int ny)
|
|||||||
|
|
||||||
if (!e) //if no movement
|
if (!e) //if no movement
|
||||||
{
|
{
|
||||||
if (parts[i].type!=PT_NEUT && parts[i].type!=PT_PHOT)
|
if (parts[i].type!=PT_NEUT && parts[i].type!=PT_PHOT && parts[i].type!=PT_ELEC)
|
||||||
return 0;
|
return 0;
|
||||||
if (!legacy_enable && parts[i].type==PT_PHOT && r)//PHOT heat conduction
|
if (!legacy_enable && parts[i].type==PT_PHOT && r)//PHOT heat conduction
|
||||||
{
|
{
|
||||||
@ -1066,7 +1066,7 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a
|
|||||||
//and finally set the pmap/photon maps to the newly created particle
|
//and finally set the pmap/photon maps to the newly created particle
|
||||||
if (t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)
|
if (t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)
|
||||||
photons[y][x] = t|(i<<8);
|
photons[y][x] = t|(i<<8);
|
||||||
if (t!=PT_STKM&&t!=PT_STKM2 && t!=PT_FIGH && t!=PT_PHOT && t!=PT_NEUT)
|
else if (t!=PT_STKM && t!=PT_STKM2 && t!=PT_FIGH)
|
||||||
pmap[y][x] = t|(i<<8);
|
pmap[y][x] = t|(i<<8);
|
||||||
|
|
||||||
//Fancy dust effects for powder types
|
//Fancy dust effects for powder types
|
||||||
@ -2609,7 +2609,7 @@ void update_particles(pixel *vid)//doesn't update the particles themselves, but
|
|||||||
y = (int)(parts[i].y+0.5f);
|
y = (int)(parts[i].y+0.5f);
|
||||||
if (x>=0 && y>=0 && x<XRES && y<YRES)
|
if (x>=0 && y>=0 && x<XRES && y<YRES)
|
||||||
{
|
{
|
||||||
if (t==PT_PHOT||t==PT_NEUT)
|
if (t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)
|
||||||
photons[y][x] = t|(i<<8);
|
photons[y][x] = t|(i<<8);
|
||||||
else
|
else
|
||||||
pmap[y][x] = t|(i<<8);
|
pmap[y][x] = t|(i<<8);
|
||||||
|
Loading…
Reference in New Issue
Block a user