use the currently selected inventory item
| 1483 | |
| 1484 | // use the currently selected inventory item |
| 1485 | bool UseInventoryItem() { |
| 1486 | int type, id; |
| 1487 | |
| 1488 | Players[Player_num].inventory.GetPosTypeID(type, id); |
| 1489 | if (!type && !id) |
| 1490 | return false; |
| 1491 | |
| 1492 | if (Players[Player_num].inventory.UsePos(&Objects[Players[Player_num].objnum])) { |
| 1493 | if (Game_mode & GM_MULTI && (Netgame.local_role == LR_SERVER)) { |
| 1494 | MultiSendInventoryRemoveItem(Player_num, type, id); |
| 1495 | } |
| 1496 | } |
| 1497 | return true; |
| 1498 | } |
| 1499 | |
| 1500 | // use the currently selected countermeasure |
| 1501 | bool UseCountermeasure() { |
no test coverage detected