allowed dropObjectOnGround to be used on npcs, not just player

actorid
Tom Mason 12 years ago
parent 6567bf38f8
commit 5bfdb2449d

@ -280,7 +280,7 @@ namespace MWBase
/// @param cursor Y (relative 0-1)
/// @return true if the object was placed, or false if it was rejected because the position is too far away
virtual void dropObjectOnGround (const MWWorld::Ptr& object) = 0;
virtual void dropObjectOnGround (const MWWorld::Ptr& actor, const MWWorld::Ptr& object) = 0;
virtual bool canPlaceObject (float cursorX, float cursorY) = 0;
///< @return true if it is possible to place on object at specified cursor location

@ -220,7 +220,7 @@ void HUD::onWorldClicked(MyGUI::Widget* _sender)
if (world->canPlaceObject(mouseX, mouseY))
world->placeObject(object, mouseX, mouseY);
else
world->dropObjectOnGround(object);
world->dropObjectOnGround(world->getPlayer().getPlayer(), object);
MyGUI::PointerManager::getInstance().setPointer("arrow");

@ -1286,7 +1286,7 @@ namespace MWWorld
}
}
void World::dropObjectOnGround (const Ptr& object)
void World::dropObjectOnGround (const Ptr& actor, const Ptr& object)
{
MWWorld::Ptr::CellStore* cell = getPlayer().getPlayer().getCell();

@ -311,7 +311,7 @@ namespace MWWorld
/// @param cursor Y (relative 0-1)
/// @return true if the object was placed, or false if it was rejected because the position is too far away
virtual void dropObjectOnGround (const Ptr& object);
virtual void dropObjectOnGround (const Ptr& actor, const Ptr& object);
virtual bool canPlaceObject(float cursorX, float cursorY);
///< @return true if it is possible to place on object at specified cursor location

Loading…
Cancel
Save