summaryrefslogtreecommitdiff
path: root/src/elements/coal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements/coal.c')
-rw-r--r--src/elements/coal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elements/coal.c b/src/elements/coal.c
index e111890..14c3138 100644
--- a/src/elements/coal.c
+++ b/src/elements/coal.c
@@ -22,7 +22,7 @@ int update_COAL(UPDATE_FUNC_ARGS) {
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
{
r = pmap[y+ry][x+rx];
- if ((r>>8)>=NPART || !r)
+ if (!r)
continue;
if (((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM) && 1>(rand()%500))
{
@@ -49,7 +49,7 @@ int update_COAL(UPDATE_FUNC_ARGS) {
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
{
r = pmap[y+ry][x+rx];
- if ((r>>8)>=NPART || !r)
+ if (!r)
continue;
if (((r&0xFF)==PT_COAL || (r&0xFF)==PT_BCOL)&&(parts[i].tmp2>parts[r>>8].tmp2)&&parts[i].tmp2>0)//diffusion
{