really fix coordinates when placing stamps ...

This commit is contained in:
jacob1 2015-07-07 00:44:06 -04:00
parent eb7aacc478
commit f95db0278e
2 changed files with 11 additions and 3 deletions

View File

@ -902,7 +902,7 @@ void Renderer::DrawWalls()
}
}
if (sim->wtypes[wt].eglow && powered && (render_mode & FIRE_BLEND))
if (sim->wtypes[wt].eglow && powered)
{
// glow if electrified
pixel glow = sim->wtypes[wt].eglow;

View File

@ -43,8 +43,8 @@ int Simulation::Load(int fullX, int fullY, GameSave * save)
save->Expand();
//Align to blockMap
blockX = fullX/CELL;
blockY = fullY/CELL;
blockX = (fullX + CELL/2)/CELL;
blockY = (fullY + CELL/2)/CELL;
fullX = blockX*CELL;
fullY = blockY*CELL;
@ -112,6 +112,14 @@ int Simulation::Load(int fullX, int fullY, GameSave * save)
pmap[y][x] = 0;
elementCount[tempPart.type]++;
}
else if ((r = photons[y][x]))
{
elementCount[parts[r>>8].type]--;
parts[r>>8] = tempPart;
i = r>>8;
photons[y][x] = 0;
elementCount[tempPart.type]++;
}
//Allocate new particle
else
{