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

Method GetPosTypeID

Descent3/Inventory.cpp:1196–1209  ·  view source on GitHub ↗

returns the type/id of the item at the current position returns true if the pos is a real object in the game returns false if the pos is just a type/id inventory item

Source from the content-addressed store, hash-verified

1194// returns true if the pos is a real object in the game
1195// returns false if the pos is just a type/id inventory item
1196bool Inventory::GetPosTypeID(int &type, int &id) {
1197 if (!pos) {
1198 type = id = 0;
1199 return false;
1200 }
1201
1202 type = pos->type;
1203 id = pos->id;
1204
1205 if (pos->iflags & INVF_OBJECT)
1206 return true;
1207 else
1208 return false;
1209}
1210
1211// returns the aux type/id of the item
1212// returns true if the pos is a real object in the game

Callers 9

DoKeyboardMiscFunction · 0.80
DoControllerMiscFunction · 0.80
msafe_GetValueFunction · 0.80
dInven_GetPosTypeIDFunction · 0.80
PlayerSpewInventoryFunction · 0.80
InventorySwitchFunction · 0.80
CounterMeasuresSwitchFunction · 0.80
UseInventoryItemFunction · 0.80
UseCountermeasureFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected