Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core/Movement: Fix a crash on login #23876

Closed
wants to merge 1 commit into from

Conversation

jackpoz
Copy link
Contributor

@jackpoz jackpoz commented Oct 20, 2019

Changes proposed:

  • Fix a crash in MotionMaster happening when logging in with an aura of type SPELL_AURA_MOD_CONFUSE
  • This is an attempt to fix the crash

Target branch(es): 3.3.5/master

  • 3.3.5
  • master

Issues addressed: Closes #23199

Tests performed:

Known issues and TODO list: (add/remove lines as needed)

  • There might be a better fix, especially for the Creatures in formation that don't call Initialize()

Fix a crash in MotionMaster happening when logging in with an aura of type SPELL_AURA_MOD_CONFUSE
@@ -322,7 +323,7 @@ void MotionMaster::Add(MovementGenerator* movement, MovementSlot slot/* = MOTION
return;
}

if (HasFlag(MOTIONMASTER_FLAG_UPDATE))
if (HasFlag(MOTIONMASTER_FLAG_UPDATE) || (!_owner->IsInWorld() && !_defaultInitialized))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creatures in formations call MoveIdle() instead of Initialize(), causing _defaultInitialized to never be set to true.

ccrs added a commit that referenced this pull request Oct 21, 2019
@ccrs ccrs closed this Oct 21, 2019
@VincentVanclef
Copy link

@ccrs This is not closed, casting 9992 on myself then logging in crashes the server still.

Revision: 5d056f3

unknown_worldserver.exe_[22-10_16-26-15].txt

@jackpoz jackpoz deleted the 3.3.5-motion-master-crash branch October 27, 2019 12:41
Shauren pushed a commit that referenced this pull request Dec 19, 2021
…signals AddToWorld

ref #23199
closes #23876

(cherry picked from commit d033032)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants