Available guns bug fix.
This commit is contained in:
parent
fb35d551b7
commit
85364c6f55
|
@ -289,11 +289,11 @@ static void preAttack(void)
|
|||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
else if (self->missiles.ammo)
|
||||
{
|
||||
fireMissile(self);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue