mirror of
https://github.com/alexbatalov/fallout1-ce.git
synced 2024-10-04 13:49:51 +00:00
parent
0d80c14091
commit
8c8b2cc543
@ -2266,21 +2266,7 @@ void use_inventory_on(Object* a1)
|
|||||||
int inventoryItemIndex = stack_offset[curr_stack] + keyCode - 1000;
|
int inventoryItemIndex = stack_offset[curr_stack] + keyCode - 1000;
|
||||||
if (inventoryItemIndex < pud->length) {
|
if (inventoryItemIndex < pud->length) {
|
||||||
InventoryItem* inventoryItem = &(pud->items[inventoryItemIndex]);
|
InventoryItem* inventoryItem = &(pud->items[inventoryItemIndex]);
|
||||||
if (isInCombat()) {
|
action_use_an_item_on_object(stack[0], a1, inventoryItem->item);
|
||||||
if (obj_dude->data.critter.combat.ap >= 2) {
|
|
||||||
if (action_use_an_item_on_object(obj_dude, a1, inventoryItem->item) != -1) {
|
|
||||||
int actionPoints = obj_dude->data.critter.combat.ap;
|
|
||||||
if (actionPoints < 2) {
|
|
||||||
obj_dude->data.critter.combat.ap = 0;
|
|
||||||
} else {
|
|
||||||
obj_dude->data.critter.combat.ap = actionPoints - 2;
|
|
||||||
}
|
|
||||||
intface_update_move_points(obj_dude->data.critter.combat.ap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
action_use_an_item_on_object(obj_dude, a1, inventoryItem->item);
|
|
||||||
}
|
|
||||||
keyCode = KEY_ESCAPE;
|
keyCode = KEY_ESCAPE;
|
||||||
} else {
|
} else {
|
||||||
keyCode = -1;
|
keyCode = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user