Nuclide
Software Development Kit for id Tech

Ammo Handling Helper Functions. More...

Functions

string ammoNameForNum (int)
 Returns the name of the specified ammo type. More...
 
int ammoNumForName (string)
 Returns the ammo id of a given name of ammo. More...
 
int ammoMaxForName (string)
 Returns the max ammo given name of ammo. More...
 
int ammoMaxForNum (int)
 Returns the max ammo given name of ammo. More...
 
void Ammo_Init (void)
 Called by Nuclide in CSQC_Init(). More...
 
void Ammo_DebugList (void)
 Called by the listAmmo console command. More...
 

Detailed Description

Ammo Handling Helper Functions.

Helper functions for various ammo operations. This header can be included in other libraries and projects to help deal with these sorts of issues. It is usually included by default in a library project. If you want to include this file into your own progs, you can include math.h from src/shared/.

Function Documentation

◆ Ammo_DebugList()

void Ammo_DebugList ( void  )

Called by the listAmmo console command.

Called by the listAmmo console command.

◆ Ammo_Init()

void Ammo_Init ( void  )

Called by Nuclide in CSQC_Init().

◆ ammoMaxForName()

int ammoMaxForName ( string  ammoName)

Returns the max ammo given name of ammo.

Returns 0 when invalid.

◆ ammoMaxForNum()

int ammoMaxForNum ( int  ammoIndex)

Returns the max ammo given name of ammo.

Returns 0 when invalid.

◆ ammoNameForNum()

string ammoNameForNum ( int  ammoIndex)

Returns the name of the specified ammo type.

Returns NULL when invalid.

◆ ammoNumForName()

int ammoNumForName ( string  ammoName)

Returns the ammo id of a given name of ammo.

Return -1 when invalid.