1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 20:19:57 +00:00

Fix build error and a pair of warnings

The error was about casting between osg::Callback* and osg::NodeCallback*
The warnings are both about virtual classes with non-virtual destructors
This commit is contained in:
Alexander "Ace" Olofsson 2015-07-01 15:06:38 +02:00
parent 2065e0fa2d
commit 5d24091364
3 changed files with 5 additions and 2 deletions

View file

@ -93,6 +93,7 @@ protected:
boost::shared_ptr<float> mTimePtr;
public:
virtual ~AnimationTime() { }
void setTimePtr(boost::shared_ptr<float> time)
{ mTimePtr = time; }

View file

@ -721,12 +721,12 @@ public:
if (stateset->getAttribute(osg::StateAttribute::MATERIAL))
{
SceneUtil::CompositeStateSetUpdater* composite = NULL;
osg::NodeCallback* callback = node.getUpdateCallback();
osg::NodeCallback* callback = dynamic_cast<osg::NodeCallback*>(node.getUpdateCallback());
while (callback)
{
if ((composite = dynamic_cast<SceneUtil::CompositeStateSetUpdater*>(callback)))
break;
callback = callback->getNestedCallback();
callback = dynamic_cast<osg::NodeCallback*>(callback->getNestedCallback());
}
if (composite)

View file

@ -19,6 +19,8 @@ namespace MWRender
float mStartTime;
public:
WeaponAnimationTime(Animation* animation) : mAnimation(animation), mStartTime(0) {}
virtual ~WeaponAnimationTime() { }
void setGroup(const std::string& group);
void updateStartTime();