diff --git a/src/p_mobj.h b/src/p_mobj.h index 1e429aa26..1002bac46 100644 --- a/src/p_mobj.h +++ b/src/p_mobj.h @@ -447,6 +447,8 @@ struct mobj_t mobj_t *owner; + INT32 po_movecount; // Polyobject carrying (NOT savegame, NOT Lua) + // WARNING: New fields must be added separately to savegame and Lua. }; diff --git a/src/p_polyobj.c b/src/p_polyobj.c index a27b2d847..021b8520e 100644 --- a/src/p_polyobj.c +++ b/src/p_polyobj.c @@ -879,14 +879,10 @@ static void Polyobj_carryThings(polyobj_t *po, fixed_t dx, fixed_t dy) for (; mo; mo = mo->bnext) { - // lastlook is used by the SPB to determine targets, do not let it affect it - if (mo->type == MT_SPB) + if (mo->po_movecount == pomovecount) continue; - if (mo->lastlook == pomovecount) - continue; - - mo->lastlook = pomovecount; + mo->po_movecount = pomovecount; // Don't scroll objects that aren't affected by gravity if (mo->flags & MF_NOGRAVITY) @@ -1115,14 +1111,10 @@ static void Polyobj_rotateThings(polyobj_t *po, vector2_t origin, angle_t delta, for (; mo; mo = mo->bnext) { - // lastlook is used by the SPB to determine targets, do not let it affect it - if (mo->type == MT_SPB) + if (mo->po_movecount == pomovecount) continue; - if (mo->lastlook == pomovecount) - continue; - - mo->lastlook = pomovecount; + mo->po_movecount = pomovecount; // Don't scroll objects that aren't affected by gravity if (mo->flags & MF_NOGRAVITY)