Added cPlayer:SendRotation() API function.
This commit is contained in:
parent
2e789b63d3
commit
1cab52f867
@ -1124,6 +1124,17 @@ void cPlayer::TeleportToCoords(double a_PosX, double a_PosY, double a_PosZ)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cPlayer::SendRotation(double a_YawDegrees, double a_PitchDegrees)
|
||||||
|
{
|
||||||
|
SetYaw(a_YawDegrees);
|
||||||
|
SetPitch(a_PitchDegrees);
|
||||||
|
m_ClientHandle->SendPlayerMoveLook();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Vector3d cPlayer::GetThrowStartPos(void) const
|
Vector3d cPlayer::GetThrowStartPos(void) const
|
||||||
{
|
{
|
||||||
Vector3d res = GetEyePosition();
|
Vector3d res = GetEyePosition();
|
||||||
|
@ -129,6 +129,12 @@ public:
|
|||||||
|
|
||||||
// tolua_begin
|
// tolua_begin
|
||||||
|
|
||||||
|
/** Sends the "look" packet to the player, forcing them to set their rotation to the specified values.
|
||||||
|
a_YawDegrees is clipped to range [-180, +180),
|
||||||
|
a_PitchDegrees is clipped to range [-180, +180) but the client only uses [-90, +90]
|
||||||
|
*/
|
||||||
|
void SendRotation(double a_YawDegrees, double a_PitchDegrees);
|
||||||
|
|
||||||
/** Returns the position where projectiles thrown by this player should start, player eye position + adjustment */
|
/** Returns the position where projectiles thrown by this player should start, player eye position + adjustment */
|
||||||
Vector3d GetThrowStartPos(void) const;
|
Vector3d GetThrowStartPos(void) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user