Position functions¶
-
class PositionFunctions¶
Public Static Functions
-
static double GetPosX(unsigned short pid) noexcept¶
Get the X position of a player.
- Parameters
pid – The player ID.
- Returns
The X position.
-
static double GetPosY(unsigned short pid) noexcept¶
Get the Y position of a player.
- Parameters
pid – The player ID.
- Returns
The Y position.
-
static double GetPosZ(unsigned short pid) noexcept¶
Get the Z position of a player.
- Parameters
pid – The player ID.
- Returns
The Z position.
-
static double GetPreviousCellPosX(unsigned short pid) noexcept¶
Get the X position of a player from before their latest cell change.
- Parameters
pid – The player ID.
- Returns
The X position.
-
static double GetPreviousCellPosY(unsigned short pid) noexcept¶
Get the Y position of a player from before their latest cell change.
- Parameters
pid – The player ID.
- Returns
The Y position.
-
static double GetPreviousCellPosZ(unsigned short pid) noexcept¶
Get the Z position of a player from before their latest cell change.
- Parameters
pid – The player ID.
- Returns
The Z position.
-
static double GetRotX(unsigned short pid) noexcept¶
Get the X rotation of a player.
- Parameters
pid – The player ID.
- Returns
The X rotation.
-
static double GetRotZ(unsigned short pid) noexcept¶
Get the Z rotation of a player.
- Parameters
pid – The player ID.
- Returns
The Z rotation.
-
static void SetPos(unsigned short pid, double x, double y, double z) noexcept¶
Set the position of a player.
This changes the positional coordinates recorded for that player in the server memory, but does not by itself send a packet.
- Parameters
pid – The player ID.
x – The X position.
y – The Y position.
z – The Z position.
- Returns
void
-
static void SetRot(unsigned short pid, double x, double z) noexcept¶
Set the rotation of a player.
This changes the rotational coordinates recorded for that player in the server memory, but does not by itself send a packet.
A player’s Y rotation is always 0, which is why there is no Y rotation parameter.
- Parameters
pid – The player ID.
x – The X position.
z – The Z position.
- Returns
void
-
static void SetMomentum(unsigned short pid, double x, double y, double z) noexcept¶
Set the momentum of a player.
This changes the coordinates recorded for that player’s momentum in the server memory, but does not by itself send a packet.
- Parameters
pid – The player ID.
x – The X momentum.
y – The Y momentum.
z – The Z momentum.
- Returns
void
-
static void SendPos(unsigned short pid) noexcept¶
Send a PlayerPosition packet about a player.
It is only sent to the affected player.
- Parameters
pid – The player ID.
- Returns
void
-
static void SendMomentum(unsigned short pid) noexcept¶
Send a PlayerMomentum packet about a player.
It is only sent to the affected player.
- Parameters
pid – The player ID.
- Returns
void
-
static double GetPosX(unsigned short pid) noexcept¶