summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorSimon 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)
commit16ae9a9b595ae7528344ea46f462f8105a34a79e (patch)
treef17f3efc27c15424dddf60fe7ec752f1131fc52f /src/elements
parent49a164b7ba69db5f8e50ee2576d0101a5304d860 (diff)
downloadpowder-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/elements')
-rw-r--r--src/elements/stor.c6
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)
{