diff options
Diffstat (limited to 'src/elements')
| -rw-r--r-- | src/elements/stor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/elements/stor.c b/src/elements/stor.c index 1f2558f..42802a4 100644 --- a/src/elements/stor.c +++ b/src/elements/stor.c @@ -11,7 +11,7 @@ int update_STOR(UPDATE_FUNC_ARGS) { r = pmap[y+ry][x+rx]; if ((r>>8)>=NPART || !r) continue; - if (!parts[i].tmp && !parts[i].life && (r&0xFF)!=PT_STOR && (r&0xFF)==parts[i].ctype && !(ptypes[(r&0xFF)].properties&TYPE_SOLID)) + if (!parts[i].tmp && !parts[i].life && (r&0xFF)!=PT_STOR && !(ptypes[(r&0xFF)].properties&TYPE_SOLID) && (!parts[i].ctype || (r&0xFF)==parts[i].ctype)) { parts[i].tmp = parts[r>>8].type; parts[i].temp = parts[r>>8].temp; @@ -22,8 +22,8 @@ int update_STOR(UPDATE_FUNC_ARGS) { } if(parts[i].tmp && (r&0xFF)==PT_SPRK && parts[r>>8].ctype==PT_PSCN) { - for(rx1 = 1; rx1 >= -1; rx1--){ - for(ry1 = 0; ry1 >= -1 && ry1 <= 1; ry1 = -ry1-ry1+1){ // Oscilate the Y starting at 0, 1, -1, 3, -5, etc (Though stop at -1) + for(ry1 = 1; ry1 >= -1; ry1--){ + for(rx1 = 0; rx1 >= -1 && rx1 <= 1; rx1 = -rx1-rx1+1){ // Oscilate the X starting at 0, 1, -1, 3, -5, etc (Though stop at -1) np = create_part(-1,x+rx1,y+ry1,parts[i].tmp); if (np!=-1) { |
