Project

General

Profile

Bug #3679

Spell cast effect should disappear after using rest command

Added by R. D. 9 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Low
Category:
Game Mechanics
Target version:
Start date:
12/19/2016
% Done:

100%

Reproducibility:
Always
Operating system:
Windows
Severity:
Minor

Description

If you cast a spell, then use the rest command to wait while the effect is playing, it will still be playing when the rest is over even though 1 or more hours are supposed to have passed. In the original engine the effect disappears.

Associated revisions

Revision 920021c6 (diff)
Added by Andrei Kortunov about 2 months ago

Update effects during rest (bug #3679)

Revision 4c2487d5
Added by scrawl . about 2 months ago

Merge pull request #1353 from akortunov/restfix

Update effects during rest (bug #3679)

History

#1 Updated by Andrei Kortunov 2 months ago

Even more: if you change location when effect is playing, it will be disappeared (in vanilla Morrowind).

In OpenMW this behaviour is present, but broken.
It seems EffectManager::clear() does not work as intended.

#2 Updated by Andrei Kortunov 2 months ago

About your issue: as for me, World::advanceTime (double hours, bool incremental) is a good place to clear spell effects.

I think, the function

mRendering->notifyWorldSpaceChanged();

is supposed to clear effects and water ripples. We can call this function in advanceTime(), but we need to fix behaviour from my comment above first.

#3 Updated by Andrei Kortunov 2 months ago

And this bug is confirmed on Linux, if it matters.

#4 Updated by Andrei Kortunov 2 months ago

Sorry, I was wrong.
I found where magic effects are stored. An engine adds magic effects to an object animation, something like:

MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(ptr);
if (anim)
{
anim->addEffect("meshes\\" + fx->mModel, -1);
}

Looks like we have to update the animation for every actor in scene during rest.

#5 Updated by Alexei Dobrohotov about 2 months ago

  • Status changed from New to Resolved
  • Target version set to openmw-0.43
  • % Done changed from 0 to 100

#6 Updated by Alexei Dobrohotov about 2 months ago

  • Status changed from Resolved to Closed

#7 Updated by Alexei Dobrohotov about 1 month ago

  • Assignee set to Andrei Kortunov

Also available in: Atom PDF