TPT: Fix ELEC being put into pmap instead of photons 5a3faa0584

This commit is contained in:
Simon Robertshaw 2012-04-18 19:20:04 +01:00
parent f55fc54f6e
commit 6be1b869e5

View File

@ -1320,7 +1320,7 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny)
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;
if (!legacy_enable && parts[i].type==PT_PHOT && r)//PHOT heat conduction
{
@ -2162,7 +2162,7 @@ int Simulation::create_part(int p, int x, int y, int tv)//the function for creat
//and finally set the pmap/photon maps to the newly created particle
if (t==PT_PHOT||t==PT_NEUT||t==PT_ELEC)
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);
//Fancy dust effects for powder types
@ -3380,7 +3380,7 @@ void Simulation::update_particles()//doesn't update the particles themselves, bu
y = (int)(parts[i].y+0.5f);
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);
else
pmap[y][x] = t|(i<<8);