|
|
|
@ -371,6 +371,20 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
if (mIsDrowning)
|
|
|
|
|
mDrowningFlashTheta += dt * osg::PI*2;
|
|
|
|
|
|
|
|
|
|
mSpellIcons->updateWidgets(mEffectBox, true);
|
|
|
|
|
|
|
|
|
|
if (mEnemyActorId != -1 && mEnemyHealth->getVisible())
|
|
|
|
|
{
|
|
|
|
|
updateEnemyHealthBar();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mIsDrowning)
|
|
|
|
|
{
|
|
|
|
|
float intensity = (cos(mDrowningFlashTheta) + 2.0f) / 3.0f;
|
|
|
|
|
|
|
|
|
|
mDrowningFlash->setAlpha(intensity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void HUD::setSelectedSpell(const std::string& spellId, int successChancePercent)
|
|
|
|
@ -602,23 +616,6 @@ namespace MWGui
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void HUD::update()
|
|
|
|
|
{
|
|
|
|
|
mSpellIcons->updateWidgets(mEffectBox, true);
|
|
|
|
|
|
|
|
|
|
if (mEnemyActorId != -1 && mEnemyHealth->getVisible())
|
|
|
|
|
{
|
|
|
|
|
updateEnemyHealthBar();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mIsDrowning)
|
|
|
|
|
{
|
|
|
|
|
float intensity = (cos(mDrowningFlashTheta) + 2.0f) / 3.0f;
|
|
|
|
|
|
|
|
|
|
mDrowningFlash->setAlpha(intensity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void HUD::setEnemy(const MWWorld::Ptr &enemy)
|
|
|
|
|
{
|
|
|
|
|
mEnemyActorId = enemy.getClass().getCreatureStats(enemy).getActorId();
|
|
|
|
|