diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 60 |
1 files changed, 30 insertions, 30 deletions
@@ -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; } @@ -1738,7 +1738,7 @@ int main(int argc, char *argv[]) { pv[ny][nx] = 0; } - + } else if(strcmp(console3, "velocity")==0) { @@ -1751,7 +1751,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) { @@ -1762,7 +1762,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) { @@ -1778,12 +1778,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) @@ -1792,18 +1792,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) @@ -1812,18 +1812,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) @@ -1832,18 +1832,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) @@ -1852,18 +1852,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) @@ -1878,12 +1878,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) @@ -1892,18 +1892,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) @@ -1912,18 +1912,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) @@ -1932,18 +1932,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) |
