forked from mirror/openmw-tes3mp
Object animation fix
This commit is contained in:
parent
c811ac6afe
commit
f4ee805e3b
7 changed files with 8 additions and 8 deletions
|
@ -2,11 +2,12 @@
|
|||
#include <iostream>
|
||||
#include "../mwbase/world.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/mechanicsmanager.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
#include "../mwworld/cellstore.hpp"
|
||||
#include "creaturestats.hpp"
|
||||
#include "movement.hpp"
|
||||
#include "mechanicsmanagerimp.hpp"
|
||||
|
||||
|
||||
#include <OgreMath.h>
|
||||
|
||||
|
|
|
@ -1875,7 +1875,7 @@ void CharacterController::update(float duration)
|
|||
void CharacterController::playGroup(const std::string &groupname, int mode, int count)
|
||||
{
|
||||
if(!mAnimation || !mAnimation->hasAnimation(groupname))
|
||||
std::cerr<< "Animation "<<groupname<<" not found" <<std::endl;
|
||||
std::cerr<< "Animation "<<groupname<<" not found for " << mPtr.getCellRef().getRefId() << std::endl;
|
||||
else
|
||||
{
|
||||
count = std::max(count, 1);
|
||||
|
|
|
@ -1176,12 +1176,14 @@ namespace MWRender
|
|||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
||||
ObjectAnimation::ObjectAnimation(const MWWorld::Ptr &ptr, const std::string &model, Resource::ResourceSystem* resourceSystem, bool allowLight)
|
||||
ObjectAnimation::ObjectAnimation(const MWWorld::Ptr &ptr, const std::string &model, Resource::ResourceSystem* resourceSystem, bool animated, bool allowLight)
|
||||
: Animation(ptr, osg::ref_ptr<osg::Group>(ptr.getRefData().getBaseNode()), resourceSystem)
|
||||
{
|
||||
if (!model.empty())
|
||||
{
|
||||
setObjectRoot(model, false, false);
|
||||
if (animated)
|
||||
addAnimSource(model);
|
||||
|
||||
if (!ptr.getClass().getEnchantment(ptr).empty())
|
||||
addGlow(mObjectRoot, getEnchantmentColor(ptr));
|
||||
|
|
|
@ -395,7 +395,7 @@ private:
|
|||
|
||||
class ObjectAnimation : public Animation {
|
||||
public:
|
||||
ObjectAnimation(const MWWorld::Ptr& ptr, const std::string &model, Resource::ResourceSystem* resourceSystem, bool allowLight);
|
||||
ObjectAnimation(const MWWorld::Ptr& ptr, const std::string &model, Resource::ResourceSystem* resourceSystem, bool animated, bool allowLight);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ CreatureAnimation::CreatureAnimation(const MWWorld::Ptr &ptr,
|
|||
if(!model.empty())
|
||||
{
|
||||
setObjectRoot(model, false, false);
|
||||
//setRenderProperties(mObjectRoot, RV_Actors, RQG_Main, RQG_Alpha);
|
||||
|
||||
if((ref->mBase->mFlags&ESM::Creature::Bipedal))
|
||||
addAnimSource("meshes\\xbase_anim.nif");
|
||||
|
@ -43,7 +42,6 @@ CreatureWeaponAnimation::CreatureWeaponAnimation(const MWWorld::Ptr &ptr, const
|
|||
if(!model.empty())
|
||||
{
|
||||
setObjectRoot(model, true, false);
|
||||
//setRenderProperties(mObjectRoot, RV_Actors, RQG_Main, RQG_Alpha);
|
||||
|
||||
if((ref->mBase->mFlags&ESM::Creature::Bipedal))
|
||||
addAnimSource("meshes\\xbase_anim.nif");
|
||||
|
|
|
@ -109,7 +109,7 @@ void Objects::insertModel(const MWWorld::Ptr &ptr, const std::string &mesh, bool
|
|||
{
|
||||
insertBegin(ptr);
|
||||
|
||||
std::auto_ptr<ObjectAnimation> anim (new ObjectAnimation(ptr, mesh, mResourceSystem, allowLight));
|
||||
std::auto_ptr<ObjectAnimation> anim (new ObjectAnimation(ptr, mesh, mResourceSystem, animated, allowLight));
|
||||
|
||||
if (!allowLight)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "../mwmechanics/movement.hpp"
|
||||
#include "../mwmechanics/npcstats.hpp"
|
||||
#include "../mwmechanics/actors.hpp"
|
||||
#include "../mwmechanics/mechanicsmanagerimp.hpp"
|
||||
|
||||
#include "class.hpp"
|
||||
#include "ptr.hpp"
|
||||
|
|
Loading…
Reference in a new issue