Skip to content

Commit

Permalink
[12443] Prevent annoying client freezes
Browse files Browse the repository at this point in the history
It appears it is possible for the client freezes if movement of stunned mobs is sent (combined flags of SPLINE_ENABLED and SPLINE_ROOTED).
This fix cannot be considered proper, but there should be no sideeffects.

HUGE thanks for kid10 figuring the source of some of these freezes by manually testing individual commits.
Unexpected source(*) is [12225] (ec67729)

(*) Well, the thing that made these freezes visual... - I consider these source to be older and much better hidden!
  • Loading branch information
Schmoozerd committed Apr 6, 2013
1 parent 097f902 commit 1d04658
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/game/SpellAuras.cpp
Expand Up @@ -4511,10 +4511,9 @@ void Aura::HandleAuraModStun(bool apply, bool Real)
{
((Player*)target)->m_movementInfo.SetMovementFlags(MOVEFLAG_NONE);
target->SetStandState(UNIT_STAND_STATE_STAND);// in 1.5 client
target->SetRoot(true);
}

target->SetRoot(true);

// Summon the Naj'entus Spine GameObject on target if spell is Impaling Spine
if (GetId() == 39837)
{
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12442"
#define REVISION_NR "12443"
#endif // __REVISION_NR_H__

4 comments on commit 1d04658

@xfurry
Copy link
Member

@xfurry xfurry commented on 1d04658 Apr 7, 2013

Choose a reason for hiding this comment

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

I can confirm that this will also fix the issue described here: cmangos/issues#163
Thanks.

@HerrTrigger
Copy link

Choose a reason for hiding this comment

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

Thanks guys.

@Schmoozerd
Copy link
Member Author

Choose a reason for hiding this comment

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

@SilverIce can you take a look at this?
To my reasoning there are problems with npcs sending MONSTER_MOVE packages while they are stunned/rooted/dead and similar.
It appears some of the MONSTER_MOVE packages are actually triggered by Unit::StopMoving (for an already stopped creature)

A possible way to test this behaviour:

  • revert this commit
  • spawn npc 28162 on gmisland (note he should have aura 29266 in c_t_addon.auras field (this aura will stunn)
  • gm off
  • kill the npc and the client will freeze on his respawn (interestingly it appears the client freezes only with gm off)

@SilverIce
Copy link
Member

Choose a reason for hiding this comment

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

ew. let me remember all this stuff..

the less or more proper way to root the unit would stop unit inside SetRoot method and then send root packet.
and skip movement inside MoveSplineinit::Launch if root flag is enabled.
It may look weird but blizzs using the same technique.
i'll be able explain this later

[added]
seems i haven't understand that "can you take a look at this" part..

Please sign in to comment.