mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Make a copy of the polyobject mirror number instead of relying on being able to read it from the initial linedef.
This commit is contained in:
parent
d8f88770fd
commit
eb3f243fc8
2 changed files with 4 additions and 5 deletions
|
@ -848,7 +848,7 @@ FPolyObj::FPolyObj()
|
||||||
|
|
||||||
int FPolyObj::GetMirror()
|
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->special = 0;
|
||||||
sd->linedef->args[0] = 0;
|
sd->linedef->args[0] = 0;
|
||||||
IterFindPolySides(&polyobjs[index], sd);
|
IterFindPolySides(&polyobjs[index], sd);
|
||||||
|
po->MirrorNum = sd->linedef->args[1];
|
||||||
po->crush = (type != PO_SPAWN_TYPE) ? 3 : 0;
|
po->crush = (type != PO_SPAWN_TYPE) ? 3 : 0;
|
||||||
po->bHurtOnTouch = (type == PO_SPAWNHURT_TYPE);
|
po->bHurtOnTouch = (type == PO_SPAWNHURT_TYPE);
|
||||||
po->tag = tag;
|
po->tag = tag;
|
||||||
|
@ -1647,10 +1648,7 @@ static void SpawnPolyobj (int index, int tag, int type)
|
||||||
po->bHurtOnTouch = (type == PO_SPAWNHURT_TYPE);
|
po->bHurtOnTouch = (type == PO_SPAWNHURT_TYPE);
|
||||||
po->tag = tag;
|
po->tag = tag;
|
||||||
po->seqType = po->Sidedefs[0]->linedef->args[3];
|
po->seqType = po->Sidedefs[0]->linedef->args[3];
|
||||||
// Next, change the polyobj's first line to point to a mirror
|
po->MirrorNum = po->Sidedefs[0]->linedef->args[2];
|
||||||
// if it exists
|
|
||||||
po->Sidedefs[0]->linedef->args[1] =
|
|
||||||
po->Sidedefs[0]->linedef->args[2];
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
I_Error ("SpawnPolyobj: Poly %d does not exist\n", tag);
|
I_Error ("SpawnPolyobj: Poly %d does not exist\n", tag);
|
||||||
|
|
|
@ -54,6 +54,7 @@ struct FPolyObj
|
||||||
FPolyVertex CenterSpot;
|
FPolyVertex CenterSpot;
|
||||||
FBoundingBox Bounds; // Bounds in map coordinates
|
FBoundingBox Bounds; // Bounds in map coordinates
|
||||||
subsector_t *CenterSubsector;
|
subsector_t *CenterSubsector;
|
||||||
|
int MirrorNum;
|
||||||
|
|
||||||
angle_t angle;
|
angle_t angle;
|
||||||
int tag; // reference tag assigned in HereticEd
|
int tag; // reference tag assigned in HereticEd
|
||||||
|
|
Loading…
Reference in a new issue