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:
parent
2065e0fa2d
commit
5d24091364
3 changed files with 5 additions and 2 deletions
|
@ -93,6 +93,7 @@ protected:
|
|||
boost::shared_ptr<float> mTimePtr;
|
||||
|
||||
public:
|
||||
virtual ~AnimationTime() { }
|
||||
|
||||
void setTimePtr(boost::shared_ptr<float> time)
|
||||
{ mTimePtr = time; }
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue