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

Function CheckForWeaponSelect

Descent3/multisafe.cpp:2558–2569  ·  view source on GitHub ↗

See if we should select the specified weapon

Source from the content-addressed store, hash-verified

2556}
2557// See if we should select the specified weapon
2558void CheckForWeaponSelect(int id, int weapon_index) {
2559 if (id == Player_num) {
2560 bool select_new;
2561 if (weapon_index < SECONDARY_INDEX)
2562 select_new = AutoSelectWeapon(PW_PRIMARY, weapon_index);
2563 else
2564 select_new = AutoSelectWeapon(PW_SECONDARY, weapon_index);
2565 if (!select_new) {
2566 AddFilteredHUDMessage("%s", TXT(Static_weapon_names_msg[weapon_index]));
2567 }
2568 }
2569}
2570extern uint8_t AutomapVisMap[MAX_ROOMS];
2571// New spiffy table-based code
2572bool HandleWeaponPowerups(char *pname, msafe_struct *mstruct, uint8_t *pickup) {

Callers 2

msafe_CallFunctionFunction · 0.85
HandleWeaponPowerupsFunction · 0.85

Calls 2

AutoSelectWeaponFunction · 0.85
AddFilteredHUDMessageFunction · 0.85

Tested by

no test coverage detected