mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-22 16:02:54 +02:00
TPT: Fix portals being ugly and PRTO effects not being random at first 94b8ed193f
This commit is contained in:
@@ -53,8 +53,8 @@ int update_PRTI(UPDATE_FUNC_ARGS) {
|
|||||||
if (fe) {
|
if (fe) {
|
||||||
int orbd[4] = {0, 0, 0, 0}; //Orbital distances
|
int orbd[4] = {0, 0, 0, 0}; //Orbital distances
|
||||||
int orbl[4] = {0, 0, 0, 0}; //Orbital locations
|
int orbl[4] = {0, 0, 0, 0}; //Orbital locations
|
||||||
if (!parts[i].life) parts[i].life = rand();
|
if (!sim->parts[i].life) parts[i].life = rand()*rand()*rand();
|
||||||
if (!parts[i].ctype) parts[i].ctype = rand();
|
if (!sim->parts[i].ctype) parts[i].ctype = rand()*rand()*rand();
|
||||||
sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl);
|
sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl);
|
||||||
for (r = 0; r < 4; r++) {
|
for (r = 0; r < 4; r++) {
|
||||||
if (orbd[r]>1) {
|
if (orbd[r]>1) {
|
||||||
|
@@ -85,8 +85,8 @@ int update_PRTO(UPDATE_FUNC_ARGS) {
|
|||||||
if (fe) {
|
if (fe) {
|
||||||
int orbd[4] = {0, 0, 0, 0}; //Orbital distances
|
int orbd[4] = {0, 0, 0, 0}; //Orbital distances
|
||||||
int orbl[4] = {0, 0, 0, 0}; //Orbital locations
|
int orbl[4] = {0, 0, 0, 0}; //Orbital locations
|
||||||
if (!parts[i].life) parts[i].life = rand();
|
if (!sim->parts[i].life) parts[i].life = rand()*rand()*rand();
|
||||||
if (!parts[i].ctype) parts[i].life = rand();
|
if (!sim->parts[i].ctype) parts[i].ctype = rand()*rand()*rand();
|
||||||
sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl);
|
sim->orbitalparts_get(parts[i].life, parts[i].ctype, orbd, orbl);
|
||||||
for (r = 0; r < 4; r++) {
|
for (r = 0; r < 4; r++) {
|
||||||
if (orbd[r]<254) {
|
if (orbd[r]<254) {
|
||||||
@@ -95,6 +95,11 @@ int update_PRTO(UPDATE_FUNC_ARGS) {
|
|||||||
orbd[r] = 0;
|
orbd[r] = 0;
|
||||||
orbl[r] = rand()%255;
|
orbl[r] = rand()%255;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
orbl[r] += 1;
|
||||||
|
orbl[r] = orbl[r]%255;
|
||||||
|
}
|
||||||
//orbl[r] += 1;
|
//orbl[r] += 1;
|
||||||
//orbl[r] = orbl[r]%255;
|
//orbl[r] = orbl[r]%255;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user