[Fix] Primary weapons where borked on checking for ammunition.
This commit is contained in:
parent
a99544804e
commit
1ecf7c1e54
@ -127,7 +127,8 @@ void pilot_shoot(Pilot* p, const unsigned int target, const int secondary) {
|
||||
|
||||
static void pilot_shootWeapon(Pilot* p, PilotOutfit* w, const unsigned int t) {
|
||||
// WElll... Trying to shoot when you have no ammo?? FUUU
|
||||
int quantity = outfit_isAmmo(w->outfit) ? p->secondary->quantity : w->quantity;
|
||||
int quantity = (outfit_isAmmo(w->outfit) && p->secondary) ?
|
||||
p->secondary->quantity : w->quantity;
|
||||
// Check to see if weapon is ready.
|
||||
if((SDL_GetTicks() - w->timer) < (w->outfit->delay / quantity)) return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user