Browse Source

Merge 6ec805cea9 into 5a08031caf

pull/8341/merge
Eric Robinson 1 week ago committed by GitHub
parent
commit
a1e80b2ced
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      Source/msg.cpp
  2. 4
      docs/CHANGELOG.md

8
Source/msg.cpp

@ -233,8 +233,10 @@ struct DSpawnedMonster {
int16_t golemSpellLevel; int16_t golemSpellLevel;
}; };
constexpr int MaxDeltaItems = MAXITEMS * 2;
struct DLevel { struct DLevel {
TCmdPItem item[MAXITEMS]; TCmdPItem item[MaxDeltaItems];
ankerl::unordered_dense::map<WorldTilePosition, DObjectStr> object; ankerl::unordered_dense::map<WorldTilePosition, DObjectStr> object;
ankerl::unordered_dense::map<size_t, DSpawnedMonster> spawnedMonsters; ankerl::unordered_dense::map<size_t, DSpawnedMonster> spawnedMonsters;
DMonsterStr monster[MaxMonsters]; DMonsterStr monster[MaxMonsters];
@ -531,7 +533,7 @@ int WaitForTurns()
std::byte *DeltaExportItem(std::byte *dst, const TCmdPItem *src) std::byte *DeltaExportItem(std::byte *dst, const TCmdPItem *src)
{ {
for (int i = 0; i < MAXITEMS; i++, src++) { for (int i = 0; i < MaxDeltaItems; i++, src++) {
if (src->bCmd == CMD_INVALID) { if (src->bCmd == CMD_INVALID) {
*dst++ = std::byte { 0xFF }; *dst++ = std::byte { 0xFF };
} else { } else {
@ -546,7 +548,7 @@ std::byte *DeltaExportItem(std::byte *dst, const TCmdPItem *src)
const std::byte *DeltaImportItem(const std::byte *src, const std::byte *end, TCmdPItem *dst) const std::byte *DeltaImportItem(const std::byte *src, const std::byte *end, TCmdPItem *dst)
{ {
size_t size = 0; size_t size = 0;
for (int i = 0; i < MAXITEMS; i++, dst++) { for (int i = 0; i < MaxDeltaItems; i++, dst++) {
if (&src[size] >= end) if (&src[size] >= end)
return nullptr; return nullptr;
if (src[size] == std::byte { 0xFF }) { if (src[size] == std::byte { 0xFF }) {

4
docs/CHANGELOG.md

@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Bug Fixes ### Bug Fixes
#### Multiplayer
- Potential item deletion when dropping a large amount of items and leaving the level
#### Graphics / Audio #### Graphics / Audio
- Music doesn't unmute when focus is lost on level transition with Auto Pause On Focus Lost disabled - Music doesn't unmute when focus is lost on level transition with Auto Pause On Focus Lost disabled

Loading…
Cancel
Save