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

Function GetAutoSelectPrimaryWpnIdx

Descent3/weapon.cpp:1149–1159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1147 FRAG_INDEX, GUIDED_INDEX + WPNSEL_SKIP, NAPALMROCKET_INDEX, CYCLONE_INDEX, BLACKSHARK_INDEX, SELLIST_END};
1148
1149uint16_t GetAutoSelectPrimaryWpnIdx(int slot) {
1150 int i = -1;
1151
1152 while (PrimaryWpnSelectList[i + 1] != SELLIST_END) {
1153 if (slot == i)
1154 return PrimaryWpnSelectList[i + 1];
1155 i++;
1156 }
1157
1158 return WPNSEL_INVALID;
1159}
1160
1161uint16_t GetAutoSelectSecondaryWpnIdx(int slot) {
1162 int i = -1;

Callers 4

verifyMethod · 0.85
processMethod · 0.85
realizeMethod · 0.85
weapon_select_dialogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected