Available guns bug fix.

This commit is contained in:
Steve 2015-10-30 22:38:01 +00:00
parent fb35d551b7
commit 85364c6f55
1 changed files with 2 additions and 2 deletions

View File

@ -289,11 +289,11 @@ static void preAttack(void)
{ {
if (!self->reload) if (!self->reload)
{ {
if (self->missiles.ammo == 0 || (rand() % 50) > 0) if (self->guns[0].type && (self->missiles.ammo == 0 || (rand() % 50) > 0))
{ {
fireGuns(self); fireGuns(self);
} }
else else if (self->missiles.ammo)
{ {
fireMissile(self); fireMissile(self);
} }