mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-01 20:12:50 +02:00
don't render invalid elements
This commit is contained in:
@@ -1104,7 +1104,7 @@ void Renderer::render_parts()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
for(i = 0; i<=sim->parts_lastActiveIndex; i++) {
|
for(i = 0; i<=sim->parts_lastActiveIndex; i++) {
|
||||||
if (sim->parts[i].type) {
|
if (sim->parts[i].type && sim->parts[i].type >= 0 && sim->parts[i].type < PT_NUM) {
|
||||||
t = sim->parts[i].type;
|
t = sim->parts[i].type;
|
||||||
|
|
||||||
nx = (int)(sim->parts[i].x+0.5f);
|
nx = (int)(sim->parts[i].x+0.5f);
|
||||||
|
Reference in New Issue
Block a user