mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-18 23:52:02 +00:00
- fixed deserialization of level.Scrolls.
This commit is contained in:
parent
f0e8e860f1
commit
e01965b747
1 changed files with 2 additions and 1 deletions
|
@ -288,12 +288,13 @@ FSerializer &Serialize(FSerializer &arc, const char *key, sector_t &p, sector_t
|
||||||
("scrolls", scroll, nul)
|
("scrolls", scroll, nul)
|
||||||
.EndObject();
|
.EndObject();
|
||||||
|
|
||||||
if (!scroll.isZero())
|
if (arc.isReading() && !scroll.isZero())
|
||||||
{
|
{
|
||||||
if (level.Scrolls.Size() == 0)
|
if (level.Scrolls.Size() == 0)
|
||||||
{
|
{
|
||||||
level.Scrolls.Resize(numsectors);
|
level.Scrolls.Resize(numsectors);
|
||||||
memset(&level.Scrolls[0], 0, sizeof(level.Scrolls[0])*level.Scrolls.Size());
|
memset(&level.Scrolls[0], 0, sizeof(level.Scrolls[0])*level.Scrolls.Size());
|
||||||
|
level.Scrolls[p.sectornum] = scroll;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue