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

Function DSSelectCurrentWeapon

Descent3/soar_helpers.cpp:229–235  ·  view source on GitHub ↗

CHRISHACK -- THIS WEAPON STUFF SUCKS. The current weapon slots are from 0 to 9. slots 0 - 4 are primaries (mapped twice for a total of 10 primaries (weapons 0 - 9)) Note: Weapon 0 and 5 use slot 0, weapon 1 and 6 use slot 1, etc. slots 5 - 9 are secondaries (mapped twice for a total of 10 secondaries (weapons 10 - 19)) if you currently are using the lower mapping, and you call the function wit

Source from the content-addressed store, hash-verified

227// if you currently are using the lower mapping, and you call the function with that slot
228// number, you use the higher mapping. If available at that slot, it selects that one
229bool DSSelectCurrentWeapon(int n) {
230 if (n < 0 || n > 9)
231 return false;
232
233 SelectWeapon(n);
234 return true;
235}
236
237// These are from 0 to 9
238bool DSGetCurrentPrimary(int *n) {

Callers

nothing calls this directly

Calls 1

SelectWeaponFunction · 0.85

Tested by

no test coverage detected