diff --git a/src/dobject.h b/src/dobject.h index 51102bc4c..91a80f9d0 100644 --- a/src/dobject.h +++ b/src/dobject.h @@ -201,6 +201,7 @@ enum EObjectFlags OF_EuthanizeMe = 1 << 5, // Object wants to die OF_Cleanup = 1 << 6, // Object is now being deleted by the collector OF_YesReallyDelete = 1 << 7, // Object is being deleted outside the collector, and this is okay, so don't print a warning + OF_Transient = 1 << 11, // Object should not be archived (references to it will be nulled on disk) OF_WhiteBits = OF_White0 | OF_White1, OF_MarkBits = OF_WhiteBits | OF_Black, @@ -573,6 +574,9 @@ protected: } }; +// When you write to a pointer to an Object, you must call this for +// proper bookkeeping in case the Object holding this pointer has +// already been processed by the GC. static inline void GC::WriteBarrier(DObject *pointing, DObject *pointed) { if (pointed != NULL && pointed->IsWhite() && pointing->IsBlack()) diff --git a/src/m_misc.cpp b/src/m_misc.cpp index 824fe0533..c49b342ce 100644 --- a/src/m_misc.cpp +++ b/src/m_misc.cpp @@ -123,7 +123,8 @@ int M_ReadFile (char const *name, BYTE **buffer) handle = open (name, O_RDONLY | O_BINARY, 0666); if (handle == -1) I_Error ("Couldn't read file %s", name); - if (fstat (handle,&fileinfo) == -1) + // [BL] Use stat instead of fstat for v140_xp hack + if (stat (name,&fileinfo) == -1) I_Error ("Couldn't read file %s", name); length = fileinfo.st_size; buf = new BYTE[length]; @@ -149,7 +150,8 @@ int M_ReadFileMalloc (char const *name, BYTE **buffer) handle = open (name, O_RDONLY | O_BINARY, 0666); if (handle == -1) I_Error ("Couldn't read file %s", name); - if (fstat (handle,&fileinfo) == -1) + // [BL] Use stat instead of fstat for v140_xp hack + if (stat (name,&fileinfo) == -1) I_Error ("Couldn't read file %s", name); length = fileinfo.st_size; buf = (BYTE*)M_Malloc(length); diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index e443db368..f61ad34bb 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -3800,6 +3800,8 @@ void AActor::Tick () else if (Z() <= floorz) { Crash(); + if (ObjectFlags & OF_EuthanizeMe) + return; // actor was destroyed } CheckPortalTransition(true); diff --git a/src/serializer.cpp b/src/serializer.cpp index 5564cdf50..dacf3c8ed 100644 --- a/src/serializer.cpp +++ b/src/serializer.cpp @@ -1452,7 +1452,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, DObject *&value, DObje { ndx = -1; } - else if (value->ObjectFlags & OF_EuthanizeMe) + else if (value->ObjectFlags & (OF_EuthanizeMe | OF_Transient)) { return arc; } diff --git a/src/textures/animations.cpp b/src/textures/animations.cpp index 74f9b1f55..f46289f07 100644 --- a/src/textures/animations.cpp +++ b/src/textures/animations.cpp @@ -161,6 +161,16 @@ FAnimDef *FTextureManager::AddComplexAnim (FTextureID picnum, const TArray entries, terminated by a 0xFF byte. Each entry +// is 23 bytes long and consists of the following fields: +// Byte 0: Bit 1 set for wall texture, clear for flat texture. +// Bytes 1-9: '\0'-terminated name of first texture. +// Bytes 10-18: '\0'-terminated name of last texture. +// Bytes 19-22: Tics per frame (stored in little endian order). +// //========================================================================== CVAR(Bool, debuganimated, false, 0) diff --git a/wadsrc/static/animated.lmp b/wadsrc/static/animated.lmp deleted file mode 100644 index 100c804c8..000000000 Binary files a/wadsrc/static/animated.lmp and /dev/null differ diff --git a/wadsrc/static/filter/game-doomchex/animated.lmp b/wadsrc/static/filter/game-doomchex/animated.lmp new file mode 100644 index 000000000..016ce1fa3 Binary files /dev/null and b/wadsrc/static/filter/game-doomchex/animated.lmp differ diff --git a/wadsrc/static/filter/game-heretic/animated.lmp b/wadsrc/static/filter/game-heretic/animated.lmp new file mode 100644 index 000000000..80102c88e Binary files /dev/null and b/wadsrc/static/filter/game-heretic/animated.lmp differ diff --git a/wadsrc/static/filter/game-strife/animated.lmp b/wadsrc/static/filter/game-strife/animated.lmp new file mode 100644 index 000000000..ca656cfc3 Binary files /dev/null and b/wadsrc/static/filter/game-strife/animated.lmp differ