X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/micropolis/blobdiff_plain/6a5fa4e03967ab980cdc7ef96a42400bc29b4414..e7265f7d0b2581362c1067fdf6f58c4957b7af1f:/src/sim/w_sprite.c diff --git a/src/sim/w_sprite.c b/src/sim/w_sprite.c index 22688e5..3f50989 100644 --- a/src/sim/w_sprite.c +++ b/src/sim/w_sprite.c @@ -898,11 +898,13 @@ DoShipSprite(SimSprite *sprite) sprite->frame = 0; return; } - for (z = 0; z < 8; z++) { - if (t == BtClrTab[z]) break; - if (z == 7) { - ExplodeSprite(sprite); - Destroy(sprite->x + 48, sprite->y); + if (!NoDisasters) { + for (z = 0; z < 8; z++) { + if (t == BtClrTab[z]) break; + if (z == 7) { + ExplodeSprite(sprite); + Destroy(sprite->x + 48, sprite->y); + } } } } @@ -1588,6 +1590,23 @@ GeneratePlane(int x, int y) } +MakeAirCrash(void) +{ +#ifndef NO_AIRCRASH + if (GetSprite(AIR) == NULL) { + short x, y; + + x = Rand(WORLD_X - 20) + 10; + y = Rand(WORLD_Y - 10) + 5; + + GeneratePlane(x, y); + } + + ExplodeSprite(GetSprite(AIR)); +#endif +} + + MakeTornado(void) { short x, y;