Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Difference between revisions of "WriteAngle"
From Quake Wiki
(Created page with "''void'' '''WriteAngle'''(''float'' type, ''float'' arg) == Usage == Writes a single angle value to the current network message. Server commands normally expect three of thes...") |
(No difference)
|
Latest revision as of 16:43, 1 August 2023
void WriteAngle(float type, float arg)
Usage[edit]
Writes a single angle value to the current network message. Server commands normally expect three of these sequentially to mark the pitch, yaw, and roll angles for an angle argument.
Parameters[edit]
- type
- The type of network message to write to. Can be one of the following:
MSG_BROADCAST
- Send a message to every client, not caring if they receive it. This is best used for things that have no affect on the gameplay state e.g. temp entities.
MSG_ONE
- Send a message to a single client. The client it's sent to is stored in the msg_entity global. Guarantees the client receives it.
MSG_ALL
- Similar to
MSG_BROADCAST
but it guarantees every client receives it.
- arg
- The angle argument to write to the network message.
Example[edit]
// Immediately set the player's angle msg_entity = player; WriteByte(MSG_ONE, 10); WriteAngle(MSG_ONE, newAng.x); WriteAngle(MSG_ONE, newAng.y); WriteAngle(MSG_ONE, newAng.z);