CheckMaxAmmoReached prototype
Posted: Sat Jan 31, 2009 10:36 am
I've done a function that's called everytime you pick ammo or a weapon; it just checks if you've reached the max ammo value and returns the highest amount you can pick up. Doesn't matter anyway lol. I'd like to use it in BG_CanItemBeGrabbed to check if you ammo/weapon should be picked up. It's done in g_items.c so Add_Ammo can use it. The problem is, bg_misc(with BG_CanItemBeGrabbed inside) is compiled in cgame too, and it doesn't know a function called CheckMaxAmmoReached.
I tried to add it's prototype to bg_public.h:
There are like a dozen crazy errors now: "skipping *, ent, ," or "found * expected (" or other weird stuff. Can't compile bg_misc.c into cgame too... Is that weird or what?
I tried to add it's prototype to bg_public.h:
Code: Select all
int CheckMaxAmmoReached( gentity_t *ent, int weapon, int count);