diff --git a/src/elements/bcln.c b/src/elements/bcln.c index 328fc6e9a..91dac12d2 100644 --- a/src/elements/bcln.c +++ b/src/elements/bcln.c @@ -38,18 +38,26 @@ int update_BCLN(UPDATE_FUNC_ARGS) { continue; if ((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && (r&0xFF)!=PT_BCLN && (r&0xFF)!=PT_STKM && - (r&0xFF)!=PT_STKM2 && (r&0xFF)!=PT_PBCN && + (r&0xFF)!=PT_PBCN && (r&0xFF)!=PT_STKM2 && (r&0xFF)>8].ctype; } } } else { if (parts[i].ctype==PT_LIFE) create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); - else create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + else + { + int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + if (np>=0) + { + if (parts[i].ctype==PT_LAVA && parts[i].tmp>0 && parts[i].tmp>8].ctype; } } } else { if (parts[i].ctype==PT_LIFE) create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype|(parts[i].tmp<<8)); - else create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + else + { + int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + if (np>=0) + { + if (parts[i].ctype==PT_LAVA && parts[i].tmp>0 && parts[i].tmp>8].ctype; } } @@ -100,8 +100,15 @@ int update_PBCN(UPDATE_FUNC_ARGS) { create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); } } - } else { - create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + else + { + int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + if (np>=0) + { + if (parts[i].ctype==PT_LAVA && parts[i].tmp>0 && parts[i].tmp>8].ctype; } } @@ -90,8 +90,15 @@ int update_PCLN(UPDATE_FUNC_ARGS) { create_part(-1, x+rx, y+ry, parts[i].ctype|(parts[i].tmp<<8)); } } - } else { - create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + } + else + { + int np = create_part(-1, x+rand()%3-1, y+rand()%3-1, parts[i].ctype); + if (np>=0) + { + if (parts[i].ctype==PT_LAVA && parts[i].tmp>0 && parts[i].tmp