Qukae-C is not supposed to handle a lot of network messages, since most are already handled in C.
However, builtin functions have not been built for every kind of messages in the Quake protocol, so you migth end-up composing protocol messages in Quake-C. I highly recommend that you build a single function to handle a given message type, because the structure of those messages might change, and then all your code would have to be checked for bugs.
By that way, id software didn't even bothered to write a function to generate temporary entites, though they keep using this message. It's still a long way to ISO 9001, I'm afraid.
MSG_BROADCAST = 0; // unreliable message, sent to all MSG_ONE = 1; // reliable message, sent to msg_entity MSG_ALL = 2; // reliable message, sent to all MSG_INIT = 3; // write to the init string
SVC_SETVIEWPORT = 5; SVC_SETANGLES = 10; SVC_TEMPENTITY = 23; SVC_KILLEDMONSTER = 27; SVC_FOUNDSECRET = 28; SVC_INTERMISSION = 30; SVC_FINALE = 31; SVC_CDTRACK = 32; SVC_SELLSCREEN = 33; SVC_UPDATE = 128;
Here are some of the messages defined in the Quake network protocol.
Beware, the structure of those messages might change in future version (Satan forbids!).
msg_entity = player WriteByte (MSG_ONE, SVC_SETVIEWPORT); WriteEntity( MSG_ONE, camera);This message is meant for a single client player. It sets the view position to the position of the entity camera.
msg_entity = player WriteByte (MSG_ONE, SVC_SETVIEWANGLES); WriteAngle( MSG_ONE, camera.angles_x); WriteAngle( MSG_ONE, camera.angles_y); WriteAngle( MSG_ONE, camera.angles_z);This message is meant for a single client player. It set the orientation of it's view to the same orientation than the entity camera.
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY); WriteByte (MSG_BROADCAST, entityname); WriteCoord (MSG_BROADCAST, origin_x); WriteCoord (MSG_BROADCAST, origin_y); WriteCoord (MSG_BROADCAST, origin_z);
WriteByte (MSG_ALL, SVC_CDTRACK); WriteByte (MSG_ALL, val1); // CD start track WriteByte (MSG_ALL, val2); // CD end track
WriteByte (MSG_ALL, SVC_FINALE); WriteString (MSG_ALL, "any text you like\n");
WriteByte (MSG_ALL, SVC_SELLSCREEN);Shows the infamous sell screen (like you needed it to understand).
WriteByte (MSG_ALL, SVC_INTERMISSION);Shows the inter mission camera view.
WriteByte (MSG_ALL, SVC_KILLEDMONSTER);Increase by one the count of killed monsters, as available to the client. Can be displayed with showscores.
WriteByte (MSG_ALL, SVC_FOUNDSECRET);Increase by one the count of secrets founds.
This message has a rather complex structure. I already generated some valid update messages, but since the message structure seems highly susceptible to change in the next versions of Quake, I would recommend that you never use such messages: as a matter of fact, Quake itslef is very capable of generating all the required messages... unless you start creating deathmatch cameras or the like.