- handle newly activated 'unused' fields properly for serialization.

This commit is contained in:
Christoph Oelckers 2021-07-25 10:29:50 +02:00
parent b588abbca6
commit cc3e6b74f3
2 changed files with 4 additions and 2 deletions

View file

@ -96,8 +96,6 @@ struct XSPRITE {
unsigned int medium : 2; // medium unsigned int medium : 2; // medium
unsigned int respawn : 2; // Respawn option unsigned int respawn : 2; // Respawn option
unsigned int unused2 : 1; // (new) patrol state unsigned int unused2 : 1; // (new) patrol state
unsigned int unused3 : 2; // "unused"
unsigned int unused4 : 6; // "unused"
}; };
}; };
int32_t targetX; // target x int32_t targetX; // target x
@ -134,6 +132,8 @@ struct XSPRITE {
uint8_t lockMsg; // Lock msg uint8_t lockMsg; // Lock msg
int8_t dodgeDir; // Dude dodge direction int8_t dodgeDir; // Dude dodge direction
uint8_t unused1; // modern flags uint8_t unused1; // modern flags
uint8_t unused3; // something about sight checks
uint8_t unused4; // patrol turn delay
}; };

View file

@ -568,6 +568,8 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, XSPRITE& w, XSPRIT
("lockmsg", w.lockMsg, def->lockMsg) ("lockmsg", w.lockMsg, def->lockMsg)
("dodgedir", w.dodgeDir, def->dodgeDir) ("dodgedir", w.dodgeDir, def->dodgeDir)
("modernflags", w.unused1, def->unused1) ("modernflags", w.unused1, def->unused1)
("sightstuff", w.unused3, def->unused3)
("patrolturndelay", w.unused4, def->unused4)
.EndObject(); .EndObject();
} }
return arc; return arc;