|
UFO: Alien Invasion
|

Go to the source code of this file.
Functions | |
| void | NET_WriteChar (dbuffer *buf, char c) |
| void | NET_WriteByte (dbuffer *buf, byte c) |
| void | NET_WriteShort (dbuffer *buf, int c) |
| void | NET_WriteLong (dbuffer *buf, int c) |
| void | NET_WriteString (dbuffer *buf, const char *str) |
| void | NET_WriteRawString (dbuffer *buf, const char *str) |
Skip the zero string terminal character. If you need it, use NET_WriteString. | |
| void | NET_WriteCoord (dbuffer *buf, float f) |
| void | NET_Write2Pos (dbuffer *buf, const vec2_t pos) |
| void | NET_WritePos (dbuffer *buf, const vec3_t pos) |
| void | NET_WriteGPos (dbuffer *buf, const pos3_t pos) |
| void | NET_WriteAngle (dbuffer *buf, float f) |
| void | NET_WriteAngle16 (dbuffer *buf, float f) |
| void | NET_WriteDir (dbuffer *buf, const vec3_t dir) |
| void | NET_vWriteFormat (dbuffer *buf, const char *format, va_list ap) |
| Writes to buffer according to format; version without syntactic sugar for variable arguments, to call it from other functions with variable arguments. | |
| void | NET_WriteFormat (dbuffer *buf, const char *format,...) |
| The user-friendly version of NET_WriteFormat that writes variable arguments to buffer according to format. | |
| int | NET_ReadChar (dbuffer *buf) |
| int | NET_ReadByte (dbuffer *buf) |
| Reads a byte from the netchannel. | |
| int | NET_ReadShort (dbuffer *buf) |
| int | NET_PeekByte (const dbuffer *buf) |
| int | NET_PeekShort (const dbuffer *buf) |
| Peeks into a buffer without changing it to get a short int. | |
| int | NET_PeekLong (const dbuffer *buf) |
| int | NET_ReadLong (dbuffer *buf) |
| int | NET_ReadString (dbuffer *buf, char *string, size_t length) |
| int | NET_ReadStringLine (dbuffer *buf, char *string, size_t length) |
| float | NET_ReadCoord (dbuffer *buf) |
| void | NET_Read2Pos (dbuffer *buf, vec2_t pos) |
| void | NET_ReadPos (dbuffer *buf, vec3_t pos) |
| void | NET_ReadGPos (dbuffer *buf, pos3_t pos) |
| float | NET_ReadAngle (dbuffer *buf) |
| float | NET_ReadAngle16 (dbuffer *buf) |
| void | NET_ReadData (dbuffer *buf, void *data, int len) |
| void | NET_ReadDir (dbuffer *buf, vec3_t dir) |
| void | NET_vReadFormat (dbuffer *buf, const char *format, va_list ap) |
| Reads from a buffer according to format; version without syntactic sugar for variable arguments, to call it from other functions with variable arguments. | |
| void | NET_SkipFormat (dbuffer *buf, const char *format) |
| void | NET_ReadFormat (dbuffer *buf, const char *format,...) |
| The user-friendly version of NET_ReadFormat that reads variable arguments from a buffer according to format. | |
| void | NET_OOB_Printf (struct net_stream *s, const char *format,...) |
| Out of band print. | |
| void | NET_WriteMsg (struct net_stream *s, dbuffer &buf) |
| Enqueue the buffer in the net stream for ONE client. | |
| void | NET_WriteConstMsg (struct net_stream *s, const dbuffer &buf) |
| Enqueue the buffer in the net stream for MULTIPLE clients. | |
| void | NET_VPrintf (dbuffer *buf, const char *format, va_list ap, char *str, size_t length) |
Variables | |
| const vec3_t | bytedirs [] |
| static const float | POSSCALE = 32.0f |
| void NET_OOB_Printf | ( | struct net_stream * | s, |
| const char * | format, | ||
| ... ) |
Out of band print.
Definition at line 548 of file netpack.cpp.
References clc_oob, format(), len, LittleLong, NET_StreamEnqueue(), and Q_vsnprintf().
Referenced by cgame_import_t::__attribute__(), CL_Connect(), CL_ConnectionlessPacket(), Com_EndRedirect(), Com_vPrintf(), GAME_NET_OOB_Printf(), GAME_NET_OOB_Printf2(), SVC_DirectConnect(), and SVC_Info().
Definition at line 251 of file netpack.cpp.
Referenced by CL_ActorDoMoveTime(), and NET_OOB_Printf().
Definition at line 273 of file netpack.cpp.
References LittleLong, and v.
Referenced by CL_ActorDoMove(), CL_ActorDoMoveTime(), and NET_OOB_Printf().
Peeks into a buffer without changing it to get a short int.
| buf | The buffer, returned unchanged, no need to be copied before. |
Definition at line 264 of file netpack.cpp.
References LittleShort, and v.
Referenced by CL_CheckDefault(), and NET_OOB_Printf().
Definition at line 355 of file netpack.cpp.
References NET_ReadLong(), and POSSCALE.
Referenced by NET_OOB_Printf().
| float NET_ReadAngle | ( | dbuffer * | buf | ) |
Definition at line 383 of file netpack.cpp.
References NET_ReadChar().
Referenced by NET_OOB_Printf(), NET_SkipFormat(), NET_vReadFormat(), and SV_ReadAngle().
| float NET_ReadAngle16 | ( | dbuffer * | buf | ) |
Definition at line 388 of file netpack.cpp.
References NET_ReadShort(), and SHORT2ANGLE.
Referenced by NET_OOB_Printf().
Reads a byte from the netchannel.
Definition at line 234 of file netpack.cpp.
Referenced by CL_ActorDoMove(), CL_ActorDoMoveTime(), CL_DoEndRound(), CL_EndRoundAnnounce(), CL_ParseEvent(), CL_ParseResults(), CL_ParseServerMessage(), CL_ReadPackets(), CL_StartGame(), GAME_GetImportData(), cgame_import_t::int(), NET_OOB_Printf(), NET_ReadData(), NET_ReadDir(), NET_ReadGPos(), NET_ReadString(), NET_ReadStringLine(), NET_SkipFormat(), NET_vReadFormat(), SV_ReadByte(), and SV_ReadPacket().
returns -1 if no more characters are available
Definition at line 221 of file netpack.cpp.
Referenced by NET_OOB_Printf(), NET_ReadAngle(), NET_SkipFormat(), NET_vReadFormat(), and SV_ReadChar().
| float NET_ReadCoord | ( | dbuffer * | buf | ) |
Definition at line 347 of file netpack.cpp.
References NET_ReadLong().
Referenced by NET_OOB_Printf().
Definition at line 394 of file netpack.cpp.
References data, i, len, and NET_ReadByte().
Referenced by NET_OOB_Printf(), and SV_ReadData().
Definition at line 400 of file netpack.cpp.
References bytedirs, Com_Error(), ERR_DROP, lengthof, NET_ReadByte(), and VectorCopy.
Referenced by NET_OOB_Printf(), NET_SkipFormat(), NET_vReadFormat(), and SV_ReadDir().
The user-friendly version of NET_ReadFormat that reads variable arguments from a buffer according to format.
Definition at line 533 of file netpack.cpp.
References format(), and NET_vReadFormat().
Referenced by CL_ActorAdd(), CL_ActorAppear(), CL_ActorClientAction(), CL_ActorDie(), CL_ActorDoShoot(), CL_ActorDoShootTime(), CL_ActorDoThrow(), CL_ActorDoTurn(), CL_ActorEndShoot(), CL_ActorReactionFireAbortShot(), CL_ActorReactionFireAbortShotTime(), CL_ActorReactionFireAddTarget(), CL_ActorReactionFireAddTargetTime(), CL_ActorReactionFireChange(), CL_ActorReactionFireRemoveTarget(), CL_ActorReactionFireRemoveTargetTime(), CL_ActorReactionFireTargetUpdate(), CL_ActorReactionFireTargetUpdateTime(), CL_ActorReservationChange(), CL_ActorResetClientAction(), CL_ActorRevitalised(), CL_ActorShootHidden(), CL_ActorShootHiddenTime(), CL_ActorStartShoot(), CL_ActorStateChange(), CL_ActorStats(), CL_ActorWound(), CL_AddBrushModel(), CL_AddEdict(), CL_CameraAppear(), CL_CenterView(), CL_DoorClose(), CL_DoorOpen(), CL_EntAppear(), CL_EntDestroy(), CL_EntPerish(), CL_Explode(), CL_InvAmmo(), CL_InvDel(), CL_InvReload(), CL_MoveView(), CL_NetReceiveItem(), CL_ParticleAppear(), CL_ParticleSpawnEvent(), CL_Reset(), CL_SoundEvent(), CL_SoundEventTime(), and NET_OOB_Printf().
Definition at line 376 of file netpack.cpp.
References NET_ReadByte().
Referenced by CL_ActorDoMove(), NET_OOB_Printf(), NET_SkipFormat(), NET_vReadFormat(), and SV_ReadGPos().
Definition at line 282 of file netpack.cpp.
References LittleLong, and v.
Referenced by CL_ActorDoMove(), CL_ActorDoMoveTime(), CL_ParseServerData(), GAME_GetImportData(), cgame_import_t::int(), NET_OOB_Printf(), NET_Read2Pos(), NET_ReadCoord(), NET_ReadPos(), NET_SkipFormat(), NET_vReadFormat(), and SV_ReadLong().
Definition at line 364 of file netpack.cpp.
References NET_ReadLong(), and POSSCALE.
Referenced by NET_OOB_Printf(), NET_SkipFormat(), NET_vReadFormat(), and SV_ReadPos().
Definition at line 242 of file netpack.cpp.
References LittleShort, and v.
Referenced by CL_ActorAdd(), CL_ActorAppear(), CL_ActorDoMove(), CL_ActorDoMoveTime(), CL_ActorDoThrowTime(), CL_ActorStats(), CL_InvAdd(), CL_ParseConfigString(), CL_ParseServerData(), GAME_GetImportData(), cgame_import_t::int(), NET_OOB_Printf(), NET_ReadAngle16(), NET_SkipFormat(), NET_vReadFormat(), and SV_ReadShort().
char* s = NET_ReadString(sb);
char* t = NET_ReadString(sb); The second reading uses the same data buffer for the string - so s is no longer the first - but the second string | [in,out] | buf | The input buffer to read the string data from |
| [out] | string | The output buffer to read the string into |
| [in] | length | The size of the output buffer |
Definition at line 302 of file netpack.cpp.
References length, and NET_ReadByte().
Referenced by CL_ConnectionlessPacket(), CL_ParseServerData(), CL_ParseServerMessage(), CL_SetConfigString(), GAME_GetImportData(), cgame_import_t::int(), NET_OOB_Printf(), NET_SkipFormat(), NET_vReadFormat(), SV_ExecuteClientMessage(), and SV_ReadString().
Definition at line 328 of file netpack.cpp.
References length, and NET_ReadByte().
Referenced by CL_ConnectionlessPacket(), GAME_GetImportData(), cgame_import_t::int(), NET_OOB_Printf(), and SV_ConnectionlessPacket().
Definition at line 476 of file netpack.cpp.
References Com_Error(), ERR_DROP, format(), i, NET_ReadAngle(), NET_ReadByte(), NET_ReadChar(), NET_ReadDir(), NET_ReadGPos(), NET_ReadLong(), NET_ReadPos(), NET_ReadShort(), NET_ReadString(), and v.
Referenced by CL_ActorAdd(), and NET_OOB_Printf().
Definition at line 603 of file netpack.cpp.
References format(), len, length, and Q_vsnprintf().
Referenced by SV_BroadcastPrintf(), SV_ClientCommand(), and SV_ClientPrintf().
Reads from a buffer according to format; version without syntactic sugar for variable arguments, to call it from other functions with variable arguments.
| [in] | buf | The buffer we read the data from |
| [in] | format | The format string may not be nullptr |
| ap | The variadic function argument list corresponding to the format string |
Definition at line 415 of file netpack.cpp.
References Com_Error(), ERR_DROP, format(), i, length, NET_ReadAngle(), NET_ReadByte(), NET_ReadChar(), NET_ReadDir(), NET_ReadGPos(), NET_ReadLong(), NET_ReadPos(), NET_ReadShort(), and NET_ReadString().
Referenced by NET_OOB_Printf(), NET_ReadFormat(), and SV_ReadFormat().
Writes to buffer according to format; version without syntactic sugar for variable arguments, to call it from other functions with variable arguments.
Definition at line 149 of file netpack.cpp.
References Com_Error(), ERR_DROP, format(), i, NET_WriteAngle(), NET_WriteByte(), NET_WriteChar(), NET_WriteDir(), NET_WriteGPos(), NET_WriteLong(), NET_WritePos(), NET_WriteShort(), and NET_WriteString().
Referenced by MSG_Write_PA(), NET_WriteFormat(), and SV_WriteFormat().
Definition at line 87 of file netpack.cpp.
References NET_WriteLong(), and POSSCALE.
Definition at line 110 of file netpack.cpp.
References f, and NET_WriteByte().
Referenced by NET_vWriteFormat(), and SV_WriteAngle().
Definition at line 115 of file netpack.cpp.
References ANGLE2SHORT, f, and NET_WriteShort().
Definition at line 39 of file netpack.cpp.
References Com_ByteToBinary(), Com_DPrintf(), and DEBUG_EVENTSYS.
Referenced by CL_ConnectionlessPacket(), CL_Disconnect(), CL_ForwardToServer_f(), CL_NextRound_f(), CL_ParseServerMessage(), CL_RequestNextDownload(), CL_SendChangedUserinfos(), Cmd_ForwardToServer(), GAME_GetImportData(), GAME_InitializeBattlescape(), GAME_NetSendCharacter(), GAME_SendCurrentTeamSpawningInfo(), GAME_StartMatch(), NET_vWriteFormat(), NET_WriteAngle(), NET_WriteDir(), NET_WriteGPos(), SV_AddEvent(), SV_BroadcastPrintf(), SV_ClientCommand(), SV_ClientPrintf(), SV_Configstring(), SV_DropClient(), SV_EndEvents(), SV_FinalMessage(), SV_FindIndex(), SV_New_f(), SV_PingPlayers(), SV_QueueEvent(), SV_QueueWriteByte(), SV_SendQueuedEvents(), SV_WriteByte(), SVC_Status(), SVC_TeamInfo(), TEST_F(), and TEST_F().
Definition at line 33 of file netpack.cpp.
References Com_ByteToBinary(), Com_DPrintf(), and DEBUG_EVENTSYS.
Referenced by NET_vWriteFormat(), and SV_WriteChar().
| void NET_WriteConstMsg | ( | struct net_stream * | s, |
| const dbuffer & | buf ) |
Enqueue the buffer in the net stream for MULTIPLE clients.
Definition at line 588 of file netpack.cpp.
References len, LittleLong, and NET_StreamEnqueue().
Referenced by SV_BroadcastPrintf(), SV_FinalMessage(), and SV_Multicast().
Definition at line 79 of file netpack.cpp.
References f, and NET_WriteLong().
Definition at line 124 of file netpack.cpp.
References bytedirs, DotProduct, i, lengthof, and NET_WriteByte().
Referenced by NET_vWriteFormat(), and SV_WriteDir().
The user-friendly version of NET_WriteFormat that writes variable arguments to buffer according to format.
Definition at line 207 of file netpack.cpp.
References format(), and NET_vWriteFormat().
Referenced by GAME_NetSendItem(), and MSG_Write_PA().
Definition at line 103 of file netpack.cpp.
References NET_WriteByte().
Referenced by NET_vWriteFormat(), and SV_WriteGPos().
Definition at line 52 of file netpack.cpp.
References Com_DPrintf(), DEBUG_EVENTSYS, LittleLong, and v.
Referenced by GAME_NetSendCharacter(), NET_vWriteFormat(), NET_Write2Pos(), NET_WriteCoord(), NET_WritePos(), SV_New_f(), SV_WriteLong(), and TEST_F().
| void NET_WriteMsg | ( | struct net_stream * | s, |
| dbuffer & | buf ) |
Enqueue the buffer in the net stream for ONE client.
Definition at line 569 of file netpack.cpp.
References len, LittleLong, and NET_StreamEnqueue().
Referenced by CL_ConnectionlessPacket(), CL_Disconnect(), CL_ForwardToServer_f(), CL_NextRound_f(), CL_ParseServerMessage(), CL_RequestNextDownload(), CL_SendChangedUserinfos(), Cmd_ForwardToServer(), GAME_InitializeBattlescape(), GAME_SpawnSoldiers(), GAME_StartMatch(), MSG_Write_PA(), SV_ClientCommand(), SV_ClientPrintf(), SV_DropClient(), SV_New_f(), SV_PingPlayers(), SVC_Status(), and SVC_TeamInfo().
Definition at line 96 of file netpack.cpp.
References NET_WriteLong(), and POSSCALE.
Referenced by NET_vWriteFormat(), SV_QueueWritePos(), and SV_WritePos().
Skip the zero string terminal character. If you need it, use NET_WriteString.
Definition at line 71 of file netpack.cpp.
References Com_DPrintf(), and DEBUG_EVENTSYS.
Referenced by SVC_Status(), and SVC_TeamInfo().
Definition at line 45 of file netpack.cpp.
References Com_DPrintf(), DEBUG_EVENTSYS, LittleShort, and v.
Referenced by GAME_GetImportData(), GAME_InitializeBattlescape(), GAME_NetSendCharacter(), GAME_NetSendInventory(), NET_vWriteFormat(), NET_WriteAngle16(), SV_AddEvent(), SV_Configstring(), SV_FindIndex(), SV_New_f(), SV_QueueEvent(), SV_QueueWriteShort(), SV_WriteShort(), and TEST_F().
Definition at line 59 of file netpack.cpp.
References Com_DPrintf(), and DEBUG_EVENTSYS.
Referenced by CL_ConnectionlessPacket(), CL_Disconnect(), CL_RequestNextDownload(), CL_SendChangedUserinfos(), GAME_NetSendCharacter(), GAME_StartMatch(), NET_vWriteFormat(), SV_Configstring(), SV_DropClient(), SV_FinalMessage(), SV_FindIndex(), SV_New_f(), SV_QueueWriteString(), SV_WriteString(), and SVC_TeamInfo().
| const vec3_t bytedirs[] |
Definition at line 27 of file netpack.cpp.
Referenced by LE_ActorBodyHit(), LE_AddProjectile(), LET_Projectile(), NET_ReadDir(), and NET_WriteDir().
|
static |
Definition at line 31 of file netpack.cpp.
Referenced by NET_Read2Pos(), NET_ReadPos(), NET_Write2Pos(), and NET_WritePos().