diff --git a/src/po_man.cpp b/src/po_man.cpp index 289e06016f..d844133b08 100644 --- a/src/po_man.cpp +++ b/src/po_man.cpp @@ -848,7 +848,7 @@ FPolyObj::FPolyObj() int FPolyObj::GetMirror() { - return Linedefs[0]->args[1]; + return MirrorNum; } //========================================================================== @@ -1572,6 +1572,7 @@ static void SpawnPolyobj (int index, int tag, int type) sd->linedef->special = 0; sd->linedef->args[0] = 0; IterFindPolySides(&polyobjs[index], sd); + po->MirrorNum = sd->linedef->args[1]; po->crush = (type != PO_SPAWN_TYPE) ? 3 : 0; po->bHurtOnTouch = (type == PO_SPAWNHURT_TYPE); po->tag = tag; @@ -1647,10 +1648,7 @@ static void SpawnPolyobj (int index, int tag, int type) po->bHurtOnTouch = (type == PO_SPAWNHURT_TYPE); po->tag = tag; po->seqType = po->Sidedefs[0]->linedef->args[3]; - // Next, change the polyobj's first line to point to a mirror - // if it exists - po->Sidedefs[0]->linedef->args[1] = - po->Sidedefs[0]->linedef->args[2]; + po->MirrorNum = po->Sidedefs[0]->linedef->args[2]; } else I_Error ("SpawnPolyobj: Poly %d does not exist\n", tag); diff --git a/src/po_man.h b/src/po_man.h index 35dc2af9ce..70ab9d3602 100644 --- a/src/po_man.h +++ b/src/po_man.h @@ -54,6 +54,7 @@ struct FPolyObj FPolyVertex CenterSpot; FBoundingBox Bounds; // Bounds in map coordinates subsector_t *CenterSubsector; + int MirrorNum; angle_t angle; int tag; // reference tag assigned in HereticEd