added new member function addBuffer to NetCommand

This commit is contained in:
Benjamin Berkels 2018-07-28 17:37:46 +02:00
parent 37fec050f1
commit 43891c3103
2 changed files with 9 additions and 0 deletions

View file

@ -649,6 +649,14 @@ void NetCommand::addName ( FName name )
}
}
//*****************************************************************************
//
void NetCommand::addBuffer ( const void *pvBuffer, int nLength )
{
_buffer.ByteStream.WriteBuffer( pvBuffer, nLength );
_buffer.ulCurrentSize = _buffer.CalcSize();
}
//*****************************************************************************
//
void NetCommand::writeCommandToStream ( BYTESTREAM_s &ByteStream ) const

View file

@ -153,6 +153,7 @@ public:
void addBit ( const bool value );
void addVariable ( const int value );
void addShortByte ( int value, int bits );
void addBuffer ( const void *pvBuffer, int nLength );
void writeCommandToStream ( BYTESTREAM_s &ByteStream ) const;
void writeCommandToPacket ( NetPacket &response ) const;
bool isUnreliable() const;