Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
Movement Namespace Reference

Classes

struct  CommonInitializer
class  counter
class  ExtraMovementStatusElement
union  FacingInfo
struct  FallInitializer
struct  Location
class  MoveSpline
class  MoveSplineFlag
class  MoveSplineInit
struct  MoveSplineInitArgs
class  PacketBuilder
class  PacketSender
class  Spline
class  SplineBase
class  TransportPathTransform

Typedefs

typedef std::vector< Vector3 > PointsArray
typedef counter< uint32, 0xFFFFFFFF > UInt32Counter

Enumerations

enum  { minimal_duration = 1 }
enum  AnimType { ToGround = 0 , FlyToFly = 1 , ToFly = 2 , FlyToGround = 3 }
enum  MonsterMoveType {
  MonsterMoveNormal = 0 , MonsterMoveStop = 1 , MonsterMoveFacingPoint = 2 , MonsterMoveFacingTarget = 3 ,
  MonsterMoveFacingAngle = 4
}

Functions

void C_Evaluate (const Vector3 *vertice, float t, const Matrix4 &matr, Vector3 &result)
void C_Evaluate_Derivative (const Vector3 *vertice, float t, const Matrix4 &matr, Vector3 &result)
uint32 computeDuration (float length, float velocity)
float computeFallElevation (float t_passed, bool isSafeFall, float start_velocity=0.0f)
float computeFallTime (float path_length, bool isSafeFall)
std::string MovementFlags_ToString (uint32 flags)
std::string MovementFlagsExtra_ToString (uint32 flags)
float MSToSec (uint32 ms)
void operator<< (ByteBuffer &b, const Vector3 &v)
void operator>> (ByteBuffer &b, Vector3 &v)
template<class Flags, int N>
void print_flags (Flags t, char const *(&names)[N], std::string &str)
bool PrintInvalidSequenceElement (MovementStatusElements element, char const *function)
static const Matrix4 s_Bezier3Coeffs (-1.f, 3.f, -3.f, 1.f, 3.f, -6.f, 3.f, 0.f, -3.f, 3.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f)
static const Matrix4 s_catmullRomCoeffs (-0.5f, 1.5f, -1.5f, 0.5f, 1.f, -2.5f, 2.f, -0.5f, -0.5f, 0.f, 0.5f, 0.f, 0.f, 1.f, 0.f, 0.f)
uint32 SecToMS (float sec)
UnitMoveType SelectSpeedType (uint32 moveFlags)
void WriteLinearPath (Spline< int32 > const &spline, ByteBuffer &data)
void WriteUncompressedCyclicPath (Spline< int32 > const &spline, ByteBuffer &data)
void WriteUncompressedPath (Spline< int32 > const &spline, ByteBuffer &data)

Variables

char const * g_MovementFlag_names []
char const * g_MovementFlagExtra_names []
char const * g_SplineFlag_names [32]
double gravity = 19.29110527038574
UInt32Counter splineIdGen
const float terminal_fallTime = float(terminalVelocity / gravity)
const float terminal_length = float(terminalVelocity * terminalVelocity) / (2.0f * gravity)
const float terminal_safeFall_fallTime = float(terminalSafefallVelocity / gravity)
const float terminal_safeFall_length = (terminalSafefallVelocity * terminalSafefallVelocity) / (2.0f * gravity)
float terminalSafefallVelocity = 7.0f
float terminalVelocity = 60.148003f
 Velocity bounds that makes fall speed limited.

Typedef Documentation

◆ PointsArray

typedef std::vector<Vector3> Movement::PointsArray

Definition at line 16 of file MoveSplineInitArgs.h.

◆ UInt32Counter

typedef counter<uint32, 0xFFFFFFFF> Movement::UInt32Counter

Definition at line 60 of file MovementTypedefs.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
minimal_duration 

Definition at line 89 of file MoveSpline.cpp.

◆ AnimType

Enumerator
ToGround 
FlyToFly 
ToFly 
FlyToGround 

Definition at line 16 of file MoveSplineInit.h.

◆ MonsterMoveType

Enumerator
MonsterMoveNormal 
MonsterMoveStop 
MonsterMoveFacingPoint 
MonsterMoveFacingTarget 
MonsterMoveFacingAngle 

Definition at line 19 of file MovementPacketBuilder.h.

Function Documentation

◆ C_Evaluate()

void Movement::C_Evaluate ( const Vector3 * vertice,
float t,
const Matrix4 & matr,
Vector3 & result )
inline

◆ C_Evaluate_Derivative()

void Movement::C_Evaluate_Derivative ( const Vector3 * vertice,
float t,
const Matrix4 & matr,
Vector3 & result )
inline

◆ computeDuration()

uint32 Movement::computeDuration ( float length,
float velocity )
inline

Definition at line 74 of file MoveSpline.cpp.

References SecToMS().

◆ computeFallElevation()

float Movement::computeFallElevation ( float t_passed,
bool isSafeFall,
float start_velocity = 0.0f )

◆ computeFallTime()

float Movement::computeFallTime ( float path_length,
bool isSafeFall )

◆ MovementFlags_ToString()

std::string Movement::MovementFlags_ToString ( uint32 flags)
extern

Definition at line 187 of file MovementUtil.cpp.

References g_MovementFlag_names, and print_flags().

Referenced by MovementInfo::OutDebug().

◆ MovementFlagsExtra_ToString()

std::string Movement::MovementFlagsExtra_ToString ( uint32 flags)
extern

Definition at line 194 of file MovementUtil.cpp.

References g_MovementFlagExtra_names, and print_flags().

Referenced by MovementInfo::OutDebug().

◆ MSToSec()

◆ operator<<()

void Movement::operator<< ( ByteBuffer & b,
const Vector3 & v )
inline

Definition at line 14 of file MovementPacketBuilder.cpp.

◆ operator>>()

void Movement::operator>> ( ByteBuffer & b,
Vector3 & v )
inline

Definition at line 19 of file MovementPacketBuilder.cpp.

◆ print_flags()

template<class Flags, int N>
void Movement::print_flags ( Flags t,
char const *(&) names[N],
std::string & str )

◆ PrintInvalidSequenceElement()

bool Movement::PrintInvalidSequenceElement ( MovementStatusElements element,
char const * function )

◆ s_Bezier3Coeffs()

const Matrix4 Movement::s_Bezier3Coeffs ( -1. f,
3. f,
-3. f,
1. f,
3. f,
-6. f,
3. f,
0. f,
-3. f,
3. f,
0. f,
0. f,
1. f,
0. f,
0. f,
0. f )
static

◆ s_catmullRomCoeffs()

const Matrix4 Movement::s_catmullRomCoeffs ( -0. 5f,
1. 5f,
-1. 5f,
0. 5f,
1. f,
-2. 5f,
2. f,
-0. 5f,
-0. 5f,
0. f,
0. 5f,
0. f,
0. f,
1. f,
0. f,
0. f )
static

◆ SecToMS()

uint32 Movement::SecToMS ( float sec)
inline

Definition at line 24 of file MovementTypedefs.h.

Referenced by computeDuration().

◆ SelectSpeedType()

◆ WriteLinearPath()

void Movement::WriteLinearPath ( Spline< int32 > const & spline,
ByteBuffer & data )

◆ WriteUncompressedCyclicPath()

void Movement::WriteUncompressedCyclicPath ( Spline< int32 > const & spline,
ByteBuffer & data )

◆ WriteUncompressedPath()

void Movement::WriteUncompressedPath ( Spline< int32 > const & spline,
ByteBuffer & data )

Variable Documentation

◆ g_MovementFlag_names

char const* Movement::g_MovementFlag_names[]

Definition at line 77 of file MovementUtil.cpp.

Referenced by MovementFlags_ToString().

◆ g_MovementFlagExtra_names

char const* Movement::g_MovementFlagExtra_names[]
Initial value:
=
{
STR(NoStrafe),
STR(NoJump),
STR(FullSpeedTurning),
STR(FullSpeedPitching),
STR(Allow_Pitching),
STR(Unk6),
STR(Unk7),
STR(Unk8),
STR(Unk9),
STR(Unk10),
STR(Unk11),
STR(Unk12),
STR(Unk13),
STR(Interpolated_Movement),
STR(Interpolated_Turning),
STR(Interpolated_Pitching),
}
#define STR(x)

Definition at line 114 of file MovementUtil.cpp.

Referenced by MovementFlagsExtra_ToString().

◆ g_SplineFlag_names

char const* Movement::g_SplineFlag_names[32]

Definition at line 134 of file MovementUtil.cpp.

Referenced by Movement::MoveSplineFlag::ToString().

◆ gravity

double Movement::gravity = 19.29110527038574

◆ splineIdGen

UInt32Counter Movement::splineIdGen

Definition at line 13 of file MovementUtil.cpp.

Referenced by Movement::MoveSplineInit::MoveSplineInit().

◆ terminal_fallTime

const float Movement::terminal_fallTime = float(terminalVelocity / gravity)

Definition at line 21 of file MovementUtil.cpp.

Referenced by computeFallElevation(), and computeFallTime().

◆ terminal_length

const float Movement::terminal_length = float(terminalVelocity * terminalVelocity) / (2.0f * gravity)

Definition at line 19 of file MovementUtil.cpp.

Referenced by computeFallTime().

◆ terminal_safeFall_fallTime

const float Movement::terminal_safeFall_fallTime = float(terminalSafefallVelocity / gravity)

Definition at line 22 of file MovementUtil.cpp.

Referenced by computeFallElevation(), and computeFallTime().

◆ terminal_safeFall_length

const float Movement::terminal_safeFall_length = (terminalSafefallVelocity * terminalSafefallVelocity) / (2.0f * gravity)

Definition at line 20 of file MovementUtil.cpp.

Referenced by computeFallTime().

◆ terminalSafefallVelocity

float Movement::terminalSafefallVelocity = 7.0f

Definition at line 17 of file MovementUtil.cpp.

Referenced by computeFallElevation(), and computeFallTime().

◆ terminalVelocity

float Movement::terminalVelocity = 60.148003f

Velocity bounds that makes fall speed limited.

Definition at line 16 of file MovementUtil.cpp.

Referenced by computeFallElevation(), and computeFallTime().