summaryrefslogtreecommitdiff
path: root/src/elements/prto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements/prto.c')
-rw-r--r--src/elements/prto.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/elements/prto.c b/src/elements/prto.c
index 1e7cde0..1dd00d4 100644
--- a/src/elements/prto.c
+++ b/src/elements/prto.c
@@ -85,8 +85,8 @@ int update_PRTO(UPDATE_FUNC_ARGS) {
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].life = rand();
+ if (!parts[i].life) parts[i].life = rand()*rand()*rand();
+ if (!parts[i].ctype) parts[i].ctype = rand()*rand()*rand();
orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl);
for (r = 0; r < 4; r++) {
if (orbd[r]<254) {
@@ -94,9 +94,10 @@ int update_PRTO(UPDATE_FUNC_ARGS) {
if (orbd[r]>254) {
orbd[r] = 0;
orbl[r] = rand()%255;
+ } else {
+ orbl[r] += 1;
+ orbl[r] = orbl[r]%255;
}
- //orbl[r] += 1;
- //orbl[r] = orbl[r]%255;
} else {
orbd[r] = 0;
orbl[r] = rand()%255;