Adjusted appearance of forced speed powerup

This commit is contained in:
Rob Pearce 2008-11-12 06:23:28 +00:00
parent e2b5879251
commit 5522481175
2 changed files with 5 additions and 3 deletions

7
rc.c
View File

@ -6184,8 +6184,11 @@ void dogravity(sprite_t *s) {
if (boss) { // no fruits on boss levels if (boss) { // no fruits on boss levels
s2->willbecome = -1; s2->willbecome = -1;
} else { } else {
// if player isn't fast, give a speed. int forcespeed = B_FALSE;
if (!haspowerupany(P_SPEED)) { if (player && !player->dead && !haspowerup(player, P_SPEED)) forcespeed = B_TRUE;
if (player2 && !player2->dead && !haspowerup(player2, P_SPEED)) forcespeed = B_TRUE;
// if anyone is alive and not fast isn't fast, give a speed.
if (forcespeed) {
s2->willbecome = P_SPEED; s2->willbecome = P_SPEED;
} else if (!gotcard & (gotsomething >= 4)) { // card for killing 5 at once } else if (!gotcard & (gotsomething >= 4)) { // card for killing 5 at once
s2->willbecome = getrandomcard(); s2->willbecome = getrandomcard();

View File

@ -2954,7 +2954,6 @@ int randompowerup(void) {
int num; int num;
num = rand() % 34; num = rand() % 34;
return P_PHONE;
switch (num) { switch (num) {
case 0: case 0:
default: default: