engine: make Netchan_TransmitBits accept const data

This commit is contained in:
Alibek Omarov 2024-10-26 19:19:37 +03:00
parent 9600218757
commit 3956e3863e
2 changed files with 2 additions and 2 deletions

View file

@ -1504,7 +1504,7 @@ transmition / retransmition of the reliable messages.
A 0 length will still generate a packet and deal with the reliable messages. A 0 length will still generate a packet and deal with the reliable messages.
================ ================
*/ */
void Netchan_TransmitBits( netchan_t *chan, int length, byte *data ) void Netchan_TransmitBits( netchan_t *chan, int length, const byte *data )
{ {
byte send_buf[NET_MAX_MESSAGE]; byte send_buf[NET_MAX_MESSAGE];
qboolean send_reliable_fragment; qboolean send_reliable_fragment;

View file

@ -305,7 +305,7 @@ qboolean Netchan_CopyNormalFragments( netchan_t *chan, sizebuf_t *msg, size_t *l
qboolean Netchan_CopyFileFragments( netchan_t *chan, sizebuf_t *msg ); qboolean Netchan_CopyFileFragments( netchan_t *chan, sizebuf_t *msg );
void Netchan_CreateFragments( netchan_t *chan, sizebuf_t *msg ); void Netchan_CreateFragments( netchan_t *chan, sizebuf_t *msg );
int Netchan_CreateFileFragments( netchan_t *chan, const char *filename ); int Netchan_CreateFileFragments( netchan_t *chan, const char *filename );
void Netchan_TransmitBits( netchan_t *chan, int lengthInBits, byte *data ); void Netchan_TransmitBits( netchan_t *chan, int lengthInBits, const byte *data );
void Netchan_OutOfBand( int net_socket, netadr_t adr, int length, byte *data ); void Netchan_OutOfBand( int net_socket, netadr_t adr, int length, byte *data );
void Netchan_OutOfBandPrint( int net_socket, netadr_t adr, const char *format, ... ) _format( 3 ); void Netchan_OutOfBandPrint( int net_socket, netadr_t adr, const char *format, ... ) _format( 3 );
qboolean Netchan_Process( netchan_t *chan, sizebuf_t *msg ); qboolean Netchan_Process( netchan_t *chan, sizebuf_t *msg );