From 573d7e7e45c2b823a3f471157c917b712e1301a5 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Fri, 13 Jul 2012 15:51:57 +0200 Subject: [PATCH] Issue #314: fix to potion use function (was mixing up potion with potion user) --- apps/openmw/mwclass/potion.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwclass/potion.cpp b/apps/openmw/mwclass/potion.cpp index d3d615262..45cb07840 100644 --- a/apps/openmw/mwclass/potion.cpp +++ b/apps/openmw/mwclass/potion.cpp @@ -11,6 +11,7 @@ #include "../mwworld/actionapply.hpp" #include "../mwworld/cellstore.hpp" #include "../mwworld/physicssystem.hpp" +#include "../mwworld/player.hpp" #include "../mwgui/window_manager.hpp" #include "../mwgui/tooltips.hpp" @@ -153,7 +154,9 @@ namespace MWClass ptr.getRefData().setCount (ptr.getRefData().getCount()-1); + MWWorld::Ptr actor = MWBase::Environment::get().getWorld()->getPlayer().getPlayer(); + return boost::shared_ptr ( - new MWWorld::ActionApply (ptr, ref->base->mId, ptr)); + new MWWorld::ActionApply (actor, ref->base->mId, actor)); } }