Searches thru all weapons for a specific name, returns -1 if not found or index of weapon with name
| 546 | // Searches thru all weapons for a specific name, returns -1 if not found |
| 547 | // or index of weapon with name |
| 548 | int 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 |
no outgoing calls
no test coverage detected