1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-19 20:53:52 +00:00

allowed dropObjectOnGround to be used on npcs, not just player

This commit is contained in:
Tom Mason 2013-01-09 18:53:14 +00:00
parent 6567bf38f8
commit 5bfdb2449d
4 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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");

View file

@ -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();

View file

@ -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