Fixed pulse logic.
This commit is contained in:
parent
bef2511ac4
commit
3ad64a1d1d
|
@ -187,31 +187,37 @@ static void addPulses(void)
|
||||||
pulseTail->next = pulse;
|
pulseTail->next = pulse;
|
||||||
pulseTail = pulse;
|
pulseTail = pulse;
|
||||||
}
|
}
|
||||||
else if (starSystem->completedChallenges < starSystem->totalChallenges && pulseTimer % (FPS * 2) == 0)
|
else if (starSystem->completedChallenges < starSystem->totalChallenges)
|
||||||
{
|
{
|
||||||
pulse = malloc(sizeof(Pulse));
|
if (pulseTimer % (FPS * 2) == 0)
|
||||||
memset(pulse, 0, sizeof(Pulse));
|
{
|
||||||
|
pulse = malloc(sizeof(Pulse));
|
||||||
|
memset(pulse, 0, sizeof(Pulse));
|
||||||
|
|
||||||
pulse->x = starSystem->x;
|
pulse->x = starSystem->x;
|
||||||
pulse->y = starSystem->y;
|
pulse->y = starSystem->y;
|
||||||
pulse->life = 255;
|
pulse->life = 255;
|
||||||
pulse->r = pulse->g = 255;
|
pulse->r = pulse->g = 255;
|
||||||
|
|
||||||
pulseTail->next = pulse;
|
pulseTail->next = pulse;
|
||||||
pulseTail = pulse;
|
pulseTail = pulse;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (starSystem->totalMissions > 0 && pulseTimer % (FPS * 3) == 0)
|
else if (starSystem->totalMissions > 0)
|
||||||
{
|
{
|
||||||
pulse = malloc(sizeof(Pulse));
|
if (pulseTimer % (FPS * 3) == 0)
|
||||||
memset(pulse, 0, sizeof(Pulse));
|
{
|
||||||
|
pulse = malloc(sizeof(Pulse));
|
||||||
|
memset(pulse, 0, sizeof(Pulse));
|
||||||
|
|
||||||
pulse->x = starSystem->x;
|
pulse->x = starSystem->x;
|
||||||
pulse->y = starSystem->y;
|
pulse->y = starSystem->y;
|
||||||
pulse->life = 255;
|
pulse->life = 255;
|
||||||
pulse->g = 255;
|
pulse->g = 255;
|
||||||
|
|
||||||
pulseTail->next = pulse;
|
pulseTail->next = pulse;
|
||||||
pulseTail = pulse;
|
pulseTail = pulse;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue