fix: add splitscreen, fix dlcs not loading, major RCE vuln fix on packet net, fix chunk loading on non-server clients, persistent saves

note: I changed how XUID works, player data might be wiped on old saves, save items on a chest or similar before trying to load old saves on new version
This commit is contained in:
NOTPIES
2026-03-07 18:30:53 -03:00
parent e077f9250f
commit d017bfc30a
76 changed files with 14967 additions and 4486 deletions

View File

@@ -51,14 +51,23 @@ void ByteArrayOutputStream::write(byteArray b)
//len - the number of bytes to write.
void ByteArrayOutputStream::write(byteArray b, unsigned int offset, unsigned int length)
{
assert( b.length >= offset + length );
if (offset > b.length || length > b.length - offset)
return;
if (length > 0xFFFFFFFF - count)
return;
// If we will fill the buffer we need to make it bigger
if( count + length >= buf.length )
buf.resize( max( count + length + 1, buf.length * 2 ) );
{
unsigned int newSize = (std::max)( count + length + 1, buf.length * 2 );
if( newSize <= buf.length )
return;
buf.resize( newSize );
}
XMemCpy( &buf[count], &b[offset], length );
//std::copy( b->data+offset, b->data+offset+length, buf->data + count ); // Or this instead?
count += length;
}