diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-09-10 18:37:33 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-09-10 18:37:33 (GMT) |
| commit | 16ae9a9b595ae7528344ea46f462f8105a34a79e (patch) | |
| tree | f17f3efc27c15424dddf60fe7ec752f1131fc52f /src | |
| parent | 49a164b7ba69db5f8e50ee2576d0101a5304d860 (diff) | |
| download | powder-16ae9a9b595ae7528344ea46f462f8105a34a79e.zip powder-16ae9a9b595ae7528344ea46f462f8105a34a79e.tar.gz | |
Small changes to STOR, prevent setting Ctype to solid from cursor, allow any type when ctype not set and correct discharge location bias
Diffstat (limited to 'src')
| -rw-r--r-- | src/elements/stor.c | 6 | ||||
| -rw-r--r-- | src/powder.c | 2 |
2 files changed, 4 insertions, 4 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) { diff --git a/src/powder.c b/src/powder.c index 4902b75..0854217 100644 --- a/src/powder.c +++ b/src/powder.c @@ -771,7 +771,7 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a if (pmap[y][x]) { if (( - (pmap[y][x]&0xFF)==PT_STOR|| + ((pmap[y][x]&0xFF)==PT_STOR&&!(ptypes[t].properties&TYPE_SOLID))|| (pmap[y][x]&0xFF)==PT_CLNE|| (pmap[y][x]&0xFF)==PT_BCLN|| (pmap[y][x]&0xFF)==PT_CONV|| |
