bugfix: when king rat dies, make sure we cancel any remaining puffin()s for new rats
This commit is contained in:
parent
6036625699
commit
95ba1e0e90
14
rc.c
14
rc.c
|
@ -1317,7 +1317,8 @@ void die(sprite_t *s) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (s == boss) { // boss effects
|
} else if (s == boss) { // boss effects
|
||||||
// stop screen shaking
|
sprite_t *ss;
|
||||||
|
// stop screen shaking and rats falling
|
||||||
if (player->powerup == PW_RATSHAKE) {
|
if (player->powerup == PW_RATSHAKE) {
|
||||||
losepowerup(player);
|
losepowerup(player);
|
||||||
}
|
}
|
||||||
|
@ -1327,6 +1328,16 @@ void die(sprite_t *s) {
|
||||||
// death timer
|
// death timer
|
||||||
s->timer3 = BOSSDIETIME;
|
s->timer3 = BOSSDIETIME;
|
||||||
|
|
||||||
|
if (s->id == P_KINGRAT) {
|
||||||
|
// stop rats from coming in
|
||||||
|
for (ss = sprite ; ss ; ss = ss->next) {
|
||||||
|
if ((s->id == P_PUFF) && (ss->timer3 == P_RAT)) {
|
||||||
|
// cancel the puffin
|
||||||
|
ss->timer3 = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// give a permenant powerup!
|
// give a permenant powerup!
|
||||||
switch (s->id) {
|
switch (s->id) {
|
||||||
case P_KINGRAT:
|
case P_KINGRAT:
|
||||||
|
@ -6180,7 +6191,6 @@ void doice(void) {
|
||||||
changed = B_TRUE;
|
changed = B_TRUE;
|
||||||
break;
|
break;
|
||||||
case T_LAND:
|
case T_LAND:
|
||||||
printf("bb\n");
|
|
||||||
curlevel->map2[yy*LEVELW+xx] = getuniq(T_ICETOP);
|
curlevel->map2[yy*LEVELW+xx] = getuniq(T_ICETOP);
|
||||||
changed = B_TRUE;
|
changed = B_TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue