mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-21 15:41:35 +02:00
fix freeze when hovering over a massive amount of portals
This commit is contained in:
@@ -1906,21 +1906,19 @@ void Renderer::render_parts()
|
|||||||
addpixel(nx+nxo, ny+nyo, colr, colg, colb, 255-orbd[r]);
|
addpixel(nx+nxo, ny+nyo, colr, colg, colb, 255-orbd[r]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pixel_mode & EFFECT_DBGLINES)
|
if (pixel_mode & EFFECT_DBGLINES && !(display_mode&DISPLAY_PERS))
|
||||||
{
|
{
|
||||||
if (mousePos.X == nx && mousePos.Y == ny && debugLines && !(display_mode&DISPLAY_PERS))//draw lines connecting wifi/portal channels
|
// draw lines connecting wifi/portal channels
|
||||||
|
if (mousePos.X == nx && mousePos.Y == ny && (i == sim->pmap[ny][nx]>>8) && debugLines)
|
||||||
{
|
{
|
||||||
int z;
|
|
||||||
int type = parts[i].type, tmp = (int)((parts[i].temp-73.15f)/100+1), othertmp;
|
int type = parts[i].type, tmp = (int)((parts[i].temp-73.15f)/100+1), othertmp;
|
||||||
if (type == PT_PRTI)
|
if (type == PT_PRTI)
|
||||||
type = PT_PRTO;
|
type = PT_PRTO;
|
||||||
else if (type == PT_PRTO)
|
else if (type == PT_PRTO)
|
||||||
type = PT_PRTI;
|
type = PT_PRTI;
|
||||||
for (z = 0; z<NPART; z++)
|
for (int z = 0; z < sim->parts_lastActiveIndex; z++)
|
||||||
{
|
{
|
||||||
if (parts[z].type)
|
if (parts[z].type == type)
|
||||||
{
|
|
||||||
if (parts[z].type==type)
|
|
||||||
{
|
{
|
||||||
othertmp = (int)((parts[z].temp-73.15f)/100+1);
|
othertmp = (int)((parts[z].temp-73.15f)/100+1);
|
||||||
if (tmp == othertmp)
|
if (tmp == othertmp)
|
||||||
@@ -1929,7 +1927,6 @@ void Renderer::render_parts()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//Fire effects
|
//Fire effects
|
||||||
if(firea && (pixel_mode & FIRE_BLEND))
|
if(firea && (pixel_mode & FIRE_BLEND))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user