mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 23:45:32 +00:00
Store an MWWorld::Ptr in the character controller
This commit is contained in:
parent
35d17fdaf6
commit
4890d901a2
2 changed files with 8 additions and 1 deletions
|
@ -166,7 +166,7 @@ namespace MWMechanics
|
|||
void Actors::addActor (const MWWorld::Ptr& ptr)
|
||||
{
|
||||
if (!MWWorld::Class::get (ptr).getCreatureStats (ptr).isDead())
|
||||
mActors[ptr] = CharacterController();
|
||||
mActors.insert(std::make_pair(ptr, CharacterController(ptr)));
|
||||
else
|
||||
MWBase::Environment::get().getWorld()->playAnimationGroup (ptr, "death1", 2);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
#ifndef GAME_MWMECHANICS_CHARACTER_HPP
|
||||
#define GAME_MWMECHANICS_CHARACTER_HPP
|
||||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
namespace MWMechanics
|
||||
{
|
||||
|
||||
class CharacterController
|
||||
{
|
||||
MWWorld::Ptr mPtr;
|
||||
|
||||
public:
|
||||
CharacterController(const MWWorld::Ptr &ptr)
|
||||
: mPtr(ptr)
|
||||
{ }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue