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

Function SelectWeapon

Descent3/weapon.cpp:903–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

901}
902
903void SelectWeapon(int slot) {
904 if (Player_object->type != OBJ_PLAYER)
905 return; // This can happen when a player is dead and tries to select a weapon
906
907 if (slot < NUM_PRIMARY_SLOTS)
908 SelectPrimaryWeapon(slot);
909 else
910 SelectSecondaryWeapon(slot);
911}
912
913// slot ranges 0-4
914void SelectPrimaryWeapon(int slot) {

Callers 2

ProcessNormalKeyFunction · 0.85
DSSelectCurrentWeaponFunction · 0.85

Calls 2

SelectPrimaryWeaponFunction · 0.85
SelectSecondaryWeaponFunction · 0.85

Tested by

no test coverage detected