allow useWith with inventory items

master
Eduardo Bart 12 years ago
parent 71c706157a
commit 85a121822e

@ -339,6 +339,9 @@ void Game::useWith(const ThingPtr& fromThing, const ThingPtr& toThing)
return; return;
Position pos = fromThing->getPosition(); Position pos = fromThing->getPosition();
if(!pos.isValid()) // virtual item
pos = Position(0xFFFF, 0, 0); // means that is a item in inventory
int fromStackpos = getThingStackpos(fromThing); int fromStackpos = getThingStackpos(fromThing);
if(fromStackpos == -1) if(fromStackpos == -1)
return; return;

Loading…
Cancel
Save