diff --git a/source/build/include/build.h b/source/build/include/build.h index 0859d0592..060bfb49d 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -509,19 +509,6 @@ inline int32_t getcorrectflorzofslope(int sectnum, int32_t dax, int32_t day) return getflorzofslopeptr((usectorptr_t)§or[sectnum], closest.x, closest.y); } -// Is a red wall in a safe fashion, i.e. only if consistency invariant -// ".nextsector >= 0 iff .nextwall >= 0" holds. -inline int32_t redwallp(uwallptr_t wal) -{ - return (wal->nextwall >= 0 && wal->nextsector >= 0); -} - -inline int32_t E_SpriteIsValid(const int32_t i) -{ - return ((unsigned)i < MAXSPRITES && sprite[i].statnum != MAXSTATUS); -} - - void alignceilslope(int16_t dasect, int32_t x, int32_t y, int32_t z); void alignflorslope(int16_t dasect, int32_t x, int32_t y, int32_t z); void setslope(int32_t sectnum, int32_t cf, int16_t slope); diff --git a/source/games/duke/src/savegame.cpp b/source/games/duke/src/savegame.cpp index 24470db79..b1c9fe308 100644 --- a/source/games/duke/src/savegame.cpp +++ b/source/games/duke/src/savegame.cpp @@ -41,7 +41,7 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms template<> FSerializer& Serialize(FSerializer& arc, const char* key, Duke3d::DDukeActor*& ht, Duke3d::DDukeActor** def) { - int index = ht? int(ht - Duke3d::hittype) : -1; + int index = ht? ht->GetSpriteIndex() : -1; assert(index >= -1 && index < MAXSPRITES); Serialize(arc, key, index, nullptr); ht = index < 0? nullptr : &Duke3d::hittype[index];