Reset fall height when teleporting (Fixes #2629)

coverity_scan^2
scrawl 8 years ago
parent 05ad0dca34
commit 9728a6967e

@ -4,6 +4,8 @@
#include "../mwbase/world.hpp" #include "../mwbase/world.hpp"
#include "../mwbase/mechanicsmanager.hpp" #include "../mwbase/mechanicsmanager.hpp"
#include "../mwmechanics/creaturestats.hpp"
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "player.hpp" #include "player.hpp"
@ -34,6 +36,7 @@ namespace MWWorld
void ActionTeleport::teleport(const Ptr &actor) void ActionTeleport::teleport(const Ptr &actor)
{ {
MWBase::World* world = MWBase::Environment::get().getWorld(); MWBase::World* world = MWBase::Environment::get().getWorld();
actor.getClass().getCreatureStats(actor).land();
if(actor == world->getPlayerPtr()) if(actor == world->getPlayerPtr())
{ {
world->getPlayer().setTeleported(true); world->getPlayer().setTeleported(true);

Loading…
Cancel
Save