mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +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();
|
propagateSpeedChange();
|
||||||
|
|
||||||
// Send speed change packet only for player
|
|
||||||
if (GetTypeId()!=TYPEID_PLAYER)
|
|
||||||
return;
|
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
if(!forced)
|
if(!forced)
|
||||||
{
|
{
|
||||||
|
|
@ -8987,10 +8983,14 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
|
||||||
SendMessageToSet( &data, true );
|
SendMessageToSet( &data, true );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if(GetTypeId() == TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
// register forced speed changes for WorldSession::HandleForceSpeedChangeAck
|
// register forced speed changes for WorldSession::HandleForceSpeedChangeAck
|
||||||
// and do it only for real sent packets and use run for run/mounted as client expected
|
// and do it only for real sent packets and use run for run/mounted as client expected
|
||||||
++((Player*)this)->m_forced_speed_changes[mtype];
|
++((Player*)this)->m_forced_speed_changes[mtype];
|
||||||
|
}
|
||||||
|
|
||||||
switch(mtype)
|
switch(mtype)
|
||||||
{
|
{
|
||||||
case MOVE_WALK:
|
case MOVE_WALK:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue