diff options
| author | Simon <simon@hardwired.org.uk> | 2011-04-08 13:33:13 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2011-04-08 13:33:13 (GMT) |
| commit | 92b2cb70bde40871bf676dce7e8eb31d712dae3f (patch) | |
| tree | 60b118dc5911f18cc54386b3aa43bf503bc7d16f | |
| parent | 7277175da08a1954b3d80ecf5678def46406456c (diff) | |
| download | powder-92b2cb70bde40871bf676dce7e8eb31d712dae3f.zip powder-92b2cb70bde40871bf676dce7e8eb31d712dae3f.tar.gz | |
Revert "Portal orbital effects stop more smoothly"
This reverts commit 29e41a0a0cfb9a83802fc3a3fe283a6d272b3331.
| -rw-r--r-- | src/elements/prti.c | 22 | ||||
| -rw-r--r-- | src/elements/prto.c | 26 |
2 files changed, 26 insertions, 22 deletions
diff --git a/src/elements/prti.c b/src/elements/prti.c index c206115..30f86ae 100644 --- a/src/elements/prti.c +++ b/src/elements/prti.c @@ -41,28 +41,32 @@ int update_PRTI(UPDATE_FUNC_ARGS) { } } - if (fe || parts[i].life || parts[i].ctype) { + + if (fe) { int orbd[4] = {0, 0, 0, 0}; //Orbital distances int orbl[4] = {0, 0, 0, 0}; //Orbital locations if (!parts[i].life) parts[i].life = rand(); if (!parts[i].ctype) parts[i].ctype = rand(); orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); for (r = 0; r < 4; r++) { - if (orbd[r]>12) { + if (orbd[r]>1) { orbd[r] -= 12; - orbl[r] += 2; - orbl[r] = orbl[r]%255; - } else { - if (fe) { + if (orbd[r]<1) { orbd[r] = (rand()%128)+128; orbl[r] = rand()%255; + } else { + orbl[r] += 2; + orbl[r] = orbl[r]%255; } - else { - orbd[r] = orbl[r] = 0; - } + } else { + orbd[r] = (rand()%128)+128; + orbl[r] = rand()%255; } } orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); + } else { + parts[i].life = 0; + parts[i].ctype = 0; } return 0; } diff --git a/src/elements/prto.c b/src/elements/prto.c index 1fb4105..46c7250 100644 --- a/src/elements/prto.c +++ b/src/elements/prto.c @@ -62,30 +62,30 @@ int update_PRTO(UPDATE_FUNC_ARGS) { } } } - - if (fe || parts[i].ctype) { + if (fe) { int orbd[4] = {0, 0, 0, 0}; //Orbital distances int orbl[4] = {0, 0, 0, 0}; //Orbital locations - if (!parts[i].life || !(~parts[i].life)) parts[i].life = rand(); - if (!parts[i].ctype) parts[i].ctype = rand(); + if (!parts[i].life) parts[i].life = rand(); + if (!parts[i].ctype) parts[i].life = rand(); orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl); for (r = 0; r < 4; r++) { - if (orbd[r]<239) { + if (orbd[r]<254) { orbd[r] += 16; - //orbl[r] += 1; - //orbl[r] = orbl[r]%255; - } else { - if (fe) { + if (orbd[r]>254) { orbd[r] = 0; orbl[r] = rand()%255; } - else { - orbd[r] = 255; - orbl[r] = 0; - } + //orbl[r] += 1; + //orbl[r] = orbl[r]%255; + } else { + orbd[r] = 0; + orbl[r] = rand()%255; } } orbitalparts_set(&parts[i].life, &parts[i].ctype, orbd, orbl); + } else { + parts[i].life = 0; + parts[i].ctype = 0; } return 0; } |
