mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 12:58:00 +03:00
Merge branch 'objectrootless' into 'master'
Account for creatures not having a model in more places Closes #8439 See merge request OpenMW/openmw!4618
This commit is contained in:
commit
2ed14de41f
4 changed files with 6 additions and 4 deletions
|
@ -229,6 +229,7 @@
|
|||
Bug #8299: Crash while smoothing landscape
|
||||
Bug #8364: Crash when clicking scrollbar without handle (divide by zero)
|
||||
Bug #8378: Korean bitmap fonts are unusable
|
||||
Bug #8439: Creatures without models can crash the game
|
||||
Feature #1415: Infinite fall failsafe
|
||||
Feature #2566: Handle NAM9 records for manual cell references
|
||||
Feature #3501: OpenMW-CS: Instance Editing - Shortcuts for axial locking
|
||||
|
|
|
@ -161,7 +161,7 @@ namespace MWRender
|
|||
|
||||
bool ActorAnimation::updateCarriedLeftVisible(const int weaptype) const
|
||||
{
|
||||
if (Settings::game().mShieldSheathing)
|
||||
if (Settings::game().mShieldSheathing && mObjectRoot)
|
||||
{
|
||||
const MWWorld::Class& cls = mPtr.getClass();
|
||||
MWMechanics::CreatureStats& stats = cls.getCreatureStats(mPtr);
|
||||
|
|
|
@ -1695,7 +1695,7 @@ namespace MWRender
|
|||
mGlowUpdater->setColor(color);
|
||||
mGlowUpdater->setDuration(glowDuration);
|
||||
}
|
||||
else
|
||||
else if (mObjectRoot)
|
||||
mGlowUpdater = SceneUtil::addEnchantedGlow(mObjectRoot, mResourceSystem, color, glowDuration);
|
||||
}
|
||||
}
|
||||
|
@ -1869,7 +1869,7 @@ namespace MWRender
|
|||
|
||||
void Animation::setAlpha(float alpha)
|
||||
{
|
||||
if (alpha == mAlpha)
|
||||
if (alpha == mAlpha || !mObjectRoot)
|
||||
return;
|
||||
mAlpha = alpha;
|
||||
|
||||
|
|
|
@ -259,7 +259,8 @@ namespace MWRender
|
|||
void CreatureWeaponAnimation::addControllers()
|
||||
{
|
||||
Animation::addControllers();
|
||||
WeaponAnimation::addControllers(mNodeMap, mActiveControllers, mObjectRoot.get());
|
||||
if (mObjectRoot)
|
||||
WeaponAnimation::addControllers(mNodeMap, mActiveControllers, mObjectRoot.get());
|
||||
}
|
||||
|
||||
osg::Vec3f CreatureWeaponAnimation::runAnimation(float duration)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue