Closed DarthFutuza closed 6 years ago
See g_cmds.cpp @ line 4145
if (!BG_AmmoIsBasedOn(wp->firemodes[ent->client->ps.firingMode].ammoBase->ammoIndex, wp->firemodes[previousFiringMode].ammoBase->ammoIndex))
is wp or ammoBase null?
@ensiform Yes, basically the funciton BG_AmmoIsBasedOn() shouldn't be called without first checking that the item actually uses ammo. I've pushed a temp fix for now, but needs to actually fix what's setting it. Probably going to let eez do that though since the new ammo system is his work and I dunno exactly how it works yet. But it looks like grenades don't set the ammoBase etc to a default value or something.
Need to do something like this:
itemInstance_t* item;
if (item->id->itemType == ITEM_CONSUMABLE)
return;
I just don't know quite how to make this work.
(see title)