Merge commit 'd3ad87b1cf48222aef5cbbc1f00cf2babadce111' into 4.3.4

Conflicts:
	sql/updates/world/2015_03_16_00_world.sql
	sql/updates/world/2015_03_16_01_world_335.sql
This commit is contained in:
Carbenium committed 2015-07-21 23:35:43 +02:00
commit f7f6eae247
13 files changed
+99 -123

No files matched your search

+37
View File
@@ -387,6 +387,43 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
}
void MotionMaster::MoveCirclePath(float x, float y, float z, float radius, bool clockwise, uint8 stepCount)
{
float step = 2 * float(M_PI) / stepCount * (clockwise ? -1.0f : 1.0f);
Position const& pos = { x, y, z, 0.0f };
float angle = pos.GetAngle(_owner->GetPositionX(), _owner->GetPositionY());
Movement::MoveSplineInit init(_owner);
for (uint8 i = 0; i < stepCount; angle += step, ++i)
{
G3D::Vector3 point;
point.x = x + radius * cosf(angle);
point.y = y + radius * sinf(angle);
if (_owner->IsFlying())
point.z = z;
else
point.z = _owner->GetMap()->GetHeight(_owner->GetPhaseMask(), point.x, point.y, z);
init.Path().push_back(point);
}
if (_owner->IsFlying())
{
init.SetFly();
init.SetCyclic();
init.SetAnimation(Movement::ToFly);
}
else
{
init.SetWalk(true);
init.SetCyclic();
}
init.Launch();
}
void MotionMaster::MoveFall(uint32 id /*=0*/)
{
// use larger distance for vmap height search than in most other cases