[Fix] Primary weapons where borked on checking for ammunition.

This commit is contained in:
Allanis 2013-02-19 23:02:42 +00:00
parent a99544804e
commit 1ecf7c1e54

View File

@ -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;