Core/Movement: Clean up and improvements on Unit::SetSpeed (#16843)
- Clean up of Unit::SetSpeed (mostly cherry picks from the 6.x branch): - the opcode sent depends on the unit. until now, MSG_MOVE_SET_* were sent for every units which isn't like retail behavior. - Removed the unused method parameter "forced" from Unit::SetSpeed - Renamed Unit::SetSpeed to SetSpeedRate - Removed the unused method parameter "forced" from Unit::UpdateSpeed - Added utility method Unit::SetSpeed which take the new flat value. Conflicts: src/server/game/Entities/Unit/Unit.cpp src/server/scripts/Commands/cs_modify.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp src/server/scripts/Kalimdor/zone_azshara.cpp src/server/scripts/Kalimdor/zone_durotar.cpp src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
This commit is contained in:
1 parent
a8b9edefbc
commit
fa8662e617
50 files changed
+146
-140
No files matched your search
@@ -103,8 +103,8 @@ class npc_pet_dk_ebon_gargoyle : public CreatureScript
|
||||
//! HACK: Creature's can't have MOVEMENTFLAG_FLYING
|
||||
// Fly Away
|
||||
me->SetCanFly(true);
|
||||
me->SetSpeed(MOVE_FLIGHT, 0.75f, true);
|
||||
me->SetSpeed(MOVE_RUN, 0.75f, true);
|
||||
me->SetSpeedRate(MOVE_FLIGHT, 0.75f);
|
||||
me->SetSpeedRate(MOVE_RUN, 0.75f);
|
||||
float x = me->GetPositionX() + 20 * std::cos(me->GetOrientation());
|
||||
float y = me->GetPositionY() + 20 * std::sin(me->GetOrientation());
|
||||
float z = me->GetPositionZ() + 40;
|
||||
|
||||
Reference in new issue
Block a user