mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Allow speed change for units
This commit is contained in:
parent
5fae2418ab
commit
6baaad4ed3
1 changed files with 7 additions and 7 deletions
|
|
@ -8933,10 +8933,6 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
|
|||
|
||||
propagateSpeedChange();
|
||||
|
||||
// Send speed change packet only for player
|
||||
if (GetTypeId()!=TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
WorldPacket data;
|
||||
if(!forced)
|
||||
{
|
||||
|
|
@ -8988,9 +8984,13 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
|
|||
}
|
||||
else
|
||||
{
|
||||
// register forced speed changes for WorldSession::HandleForceSpeedChangeAck
|
||||
// and do it only for real sent packets and use run for run/mounted as client expected
|
||||
++((Player*)this)->m_forced_speed_changes[mtype];
|
||||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
// register forced speed changes for WorldSession::HandleForceSpeedChangeAck
|
||||
// and do it only for real sent packets and use run for run/mounted as client expected
|
||||
++((Player*)this)->m_forced_speed_changes[mtype];
|
||||
}
|
||||
|
||||
switch(mtype)
|
||||
{
|
||||
case MOVE_WALK:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue