1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-02-25 07:52:43 +01:00

fix exploded enemies save

This commit is contained in:
XProger 2018-10-22 00:56:56 +03:00
parent a83250dc72
commit 812fb4a367

View File

@ -1915,6 +1915,12 @@ struct Mutant : Enemy {
jointHead = 2; jointHead = 2;
} }
virtual void setSaveData(const SaveEntity &data) {
Character::setSaveData(data);
if (flags.invisible)
deactivate(true);
}
virtual void update() { virtual void update() {
bool exploded = explodeMask != 0; bool exploded = explodeMask != 0;
@ -2137,6 +2143,12 @@ struct GiantMutant : Enemy {
invertAim = true; invertAim = true;
} }
virtual void setSaveData(const SaveEntity &data) {
Character::setSaveData(data);
if (flags.invisible)
deactivate(true);
}
void update() { void update() {
bool exploded = explodeMask != 0; bool exploded = explodeMask != 0;
@ -2277,6 +2289,12 @@ struct Centaur : Enemy {
jointHead = 17; jointHead = 17;
} }
virtual void setSaveData(const SaveEntity &data) {
Character::setSaveData(data);
if (flags.invisible)
deactivate(true);
}
virtual int getStateGround() { virtual int getStateGround() {
if (!think(true)) if (!think(true))
return state; return state;