mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[11156] Update speed for controlled units in any case, does not matter if owner's speed was really changed or not
Also remove static attribute from my prev. commit, thanks to vladimir
This commit is contained in:
parent
f31a2d3d84
commit
76ea11489d
2 changed files with 41 additions and 42 deletions
|
|
@ -8337,14 +8337,12 @@ void Unit::SetSpeedRate(UnitMoveType mtype, float rate, bool forced)
|
|||
rate = 0.0f;
|
||||
|
||||
// Update speed only on change
|
||||
if (m_speed_rate[mtype] == rate)
|
||||
return;
|
||||
|
||||
if (m_speed_rate[mtype] != rate)
|
||||
{
|
||||
m_speed_rate[mtype] = rate;
|
||||
|
||||
propagateSpeedChange();
|
||||
|
||||
static const uint16 SetSpeed2Opc_table[MAX_MOVE_TYPE][2]=
|
||||
const uint16 SetSpeed2Opc_table[MAX_MOVE_TYPE][2]=
|
||||
{
|
||||
{MSG_MOVE_SET_WALK_SPEED, SMSG_FORCE_WALK_SPEED_CHANGE},
|
||||
{MSG_MOVE_SET_RUN_SPEED, SMSG_FORCE_RUN_SPEED_CHANGE},
|
||||
|
|
@ -8384,6 +8382,7 @@ void Unit::SetSpeedRate(UnitMoveType mtype, float rate, bool forced)
|
|||
data << float(GetSpeed(mtype));
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
}
|
||||
|
||||
CallForAllControlledUnits(SetSpeedRateHelper(mtype,forced), CONTROLLED_PET|CONTROLLED_GUARDIANS|CONTROLLED_CHARM|CONTROLLED_MINIPET);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11155"
|
||||
#define REVISION_NR "11156"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue