fix: name the fourth flair colour byte padding

The client never sets or reads it, so it holds leftover memory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-26 20:33:41 -05:00
parent f8a99c45a5
commit 6262be5d25
4 changed files with 6 additions and 4 deletions

View File

@@ -69,7 +69,7 @@ NiPoint3 Chunk::GridToWorldPos(uint32_t i, uint32_t j) const {
BinaryIO::BinaryRead(stream, flair.colorR);
BinaryIO::BinaryRead(stream, flair.colorG);
BinaryIO::BinaryRead(stream, flair.colorB);
BinaryIO::BinaryRead(stream, flair.colorA);
BinaryIO::BinaryRead(stream, flair.padding);
return true;
} catch (const std::exception&) {
return false;

View File

@@ -25,8 +25,10 @@ struct FlairAttributes {
uint8_t colorR;
uint8_t colorG;
uint8_t colorB;
uint8_t colorA;
// Padding: never set when a flair is placed, so it holds leftover memory; nothing reads it
uint8_t padding;
};
static_assert(sizeof(FlairAttributes) == 36, "a flair record in the .raw is 36 bytes");
/**
* @brief Mesh triangle structure