summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/main.c b/src/main.c
index e6f29b4..d20fb35 100644
--- a/src/main.c
+++ b/src/main.c
@@ -718,7 +718,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0)
ttv |= (d[p++]);
parts[i-1].tmp = ttv;
if(ptypes[parts[i-1].type].properties&PROP_LIFE && !parts[i-1].tmp)
- for(q = 1; q<NGOL ; q++) {
+ for(q = 1; q<=NGOL ; q++) {
if(parts[i-1].type==goltype[q-1] && grule[q][9]==2)
parts[i-1].tmp = grule[q][9]-1;
}
@@ -1736,7 +1736,7 @@ int main(int argc, char *argv[])
{
pv[ny][nx] = 0;
}
-
+
}
else if(strcmp(console3, "velocity")==0)
{
@@ -1749,7 +1749,7 @@ int main(int argc, char *argv[])
}
else if(strcmp(console3, "sparks")==0)
{
- for(i=0;i<NPART;i++)
+ for(i=0; i<NPART; i++)
{
if(parts[i].type==PT_SPRK)
{
@@ -1760,7 +1760,7 @@ int main(int argc, char *argv[])
}
else if(strcmp(console3, "temp")==0)
{
- for(i=0;i<NPART;i++)
+ for(i=0; i<NPART; i++)
{
if(parts[i].type)
{
@@ -1776,12 +1776,12 @@ int main(int argc, char *argv[])
if(strcmp(console4, "all")==0)
{
j = atoi(console5);
- for(i=0;i<NPART;i++)
+ for(i=0; i<NPART; i++)
{
if(parts[i].type)
parts[i].life = j;
}
- } else
+ } else
{
i = atoi(console4);
if(parts[i].type)
@@ -1790,18 +1790,18 @@ int main(int argc, char *argv[])
parts[i].life = j;
}
}
- }
+ }
if(strcmp(console3, "type")==0)
{
if(strcmp(console4, "all")==0)
{
j = atoi(console5);
- for(i=0;i<NPART;i++)
+ for(i=0; i<NPART; i++)
{
if(parts[i].type)
parts[i].type = j;
}
- } else
+ } else
{
i = atoi(console4);
if(parts[i].type)
@@ -1810,18 +1810,18 @@ int main(int argc, char *argv[])
parts[i].type = j;
}
}
- }
+ }
if(strcmp(console3, "temp")==0)
{
if(strcmp(console4, "all")==0)
{
j = atoi(console5);
- for(i=0;i<NPART;i++)
+ for(i=0; i<NPART; i++)
{
if(parts[i].type)
parts[i].temp = j;
}
- } else
+ } else
{
i = atoi(console4);
if(parts[i].type)
@@ -1830,18 +1830,18 @@ int main(int argc, char *argv[])
parts[i].temp = j;
}
}
- }
+ }
if(strcmp(console3, "tmp")==0)
{
if(strcmp(console4, "all")==0)
{
j = atoi(console5);
- for(i=0;i<NPART;i++)
+ for(i=0; i<NPART; i++)
{
if(parts[i].type)
parts[i].tmp = j;
}
- } else
+ } else
{
i = atoi(console4);
if(parts[i].type)
@@ -1850,18 +1850,18 @@ int main(int argc, char *argv[])
parts[i].tmp = j;
}
}
- }
+ }
if(strcmp(console3, "x")==0)
{
if(strcmp(console4, "all")==0)
{
j = atoi(console5);
- for(i=0;i<NPART;i++)
+ for(i=0; i<NPART; i++)
{
if(parts[i].type)
parts[i].x = j;
}
- } else
+ } else
{
i = atoi(console4);
if(parts[i].type)
@@ -1876,12 +1876,12 @@ int main(int argc, char *argv[])
if(strcmp(console4, "all")==0)
{
j = atoi(console5);
- for(i=0;i<NPART;i++)
+ for(i=0; i<NPART; i++)
{
if(parts[i].type)
parts[i].y = j;
}
- } else
+ } else
{
i = atoi(console4);
if(parts[i].type)
@@ -1890,18 +1890,18 @@ int main(int argc, char *argv[])
parts[i].y = j;
}
}
- }
+ }
if(strcmp(console3, "ctype")==0)
{
if(strcmp(console4, "all")==0)
{
j = atoi(console5);
- for(i=0;i<NPART;i++)
+ for(i=0; i<NPART; i++)
{
if(parts[i].type)
parts[i].ctype = j;
}
- } else
+ } else
{
i = atoi(console4);
if(parts[i].type)
@@ -1910,18 +1910,18 @@ int main(int argc, char *argv[])
parts[i].ctype = j;
}
}
- }
+ }
if(strcmp(console3, "vx")==0)
{
- if(strcmp(console4, "all")==0)
+ if(strcmp(console4, "all")==0)
{
j = atoi(console5);
- for(i=0;i<NPART;i++)
+ for(i=0; i<NPART; i++)
{
if(parts[i].type)
parts[i].vx = j;
}
- } else
+ } else
{
i = atoi(console4);
if(parts[i].type)
@@ -1930,18 +1930,18 @@ int main(int argc, char *argv[])
parts[i].vx = j;
}
}
- }
+ }
if(strcmp(console3, "vy")==0)
{
if(strcmp(console4, "all")==0)
{
j = atoi(console5);
- for(i=0;i<NPART;i++)
+ for(i=0; i<NPART; i++)
{
if(parts[i].type)
parts[i].vy = j;
}
- } else
+ } else
{
i = atoi(console4);
if(parts[i].type)