diff options
Diffstat (limited to 'src/elements/clne.c')
| -rw-r--r-- | src/elements/clne.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/elements/clne.c b/src/elements/clne.c index 3dfd7bb..3ac45d8 100644 --- a/src/elements/clne.c +++ b/src/elements/clne.c @@ -34,14 +34,22 @@ int update_CLNE(UPDATE_FUNC_ARGS) { (r&0xFF)<PT_NUM) { parts[i].ctype = r&0xFF; - if ((r&0xFF)==PT_LIFE) + if ((r&0xFF)==PT_LIFE || (r&0xFF)==PT_LAVA) parts[i].tmp = parts[r>>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<PT_NUM && ptransitions[parts[i].tmp].tht==PT_LAVA) + parts[np].ctype = parts[i].tmp; + } + } } return 0; } |
