MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / FindWeaponName

Function FindWeaponName

Descent3/weapon.cpp:548–558  ·  view source on GitHub ↗

Searches thru all weapons for a specific name, returns -1 if not found or index of weapon with name

Source from the content-addressed store, hash-verified

546// Searches thru all weapons for a specific name, returns -1 if not found
547// or index of weapon with name
548int FindWeaponName(const char *name) {
549 int i;
550
551 ASSERT(name != NULL);
552
553 for (i = 0; i < MAX_WEAPONS; i++)
554 if (Weapons[i].used && !stricmp(name, Weapons[i].name))
555 return i;
556
557 return -1;
558}
559
560// Given a weapon handle, returns that weapons bitmap
561// If the weapon is animated, returns framenum mod num_of_frames in the animation

Callers 15

mng_RenamePageFunction · 0.85
mng_PopAddonPagesFunction · 0.85
mng_LoadNetWeaponPageFunction · 0.85
mng_LoadLocalWeaponPageFunction · 0.85
collide_player_and_wallFunction · 0.85
collide_generic_and_wallFunction · 0.85
OnAddWeaponMethod · 0.85
SaveWeaponsOnCloseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected