本文整理汇总了C++中MoveSplineFlag类的典型用法代码示例。如果您正苦于以下问题:C++ MoveSplineFlag类的具体用法?C++ MoveSplineFlag怎么用?C++ MoveSplineFlag使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MoveSplineFlag类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WriteCreate
void PacketBuilder::WriteCreate(const MoveSpline& move_spline, ByteBuffer& data)
{
// WriteClientStatus(mov,data);
// data.append<float>(&mov.m_float_values[SpeedWalk], SpeedMaxCount);
// if (mov.SplineEnabled())
{
MoveSplineFlag splineFlags = move_spline.splineflags;
data << splineFlags.raw();
if (splineFlags.final_angle)
{
data << move_spline.facing.angle;
}
else if (splineFlags.final_target)
{
data << move_spline.facing.target;
}
else if (splineFlags.final_point)
{
data << move_spline.facing.f.x << move_spline.facing.f.y << move_spline.facing.f.z;
}
data << move_spline.timePassed();
data << move_spline.Duration();
data << move_spline.GetId();
data << float(1.f); // splineInfo.duration_mod; added in 3.1
data << float(1.f); // splineInfo.duration_mod_next; added in 3.1
data << move_spline.vertical_acceleration; // added in 3.1
data << move_spline.effect_start_time; // added in 3.1
uint32 nodes = move_spline.getPath().size();
data << nodes;
data.append<Vector3>(&move_spline.getPath()[0], nodes);
data << uint8(move_spline.spline.mode()); // added in 3.1
data << (move_spline.isCyclic() ? Vector3::zero() : move_spline.FinalDestination());
}
}