- changed line_t's sidenum into sidedef pointers.
SVN r1801 (trunk)
This commit is contained in:
parent
e6aadca409
commit
14a42bbada
28 changed files with 211 additions and 202 deletions
|
|
@ -1868,7 +1868,7 @@ static void SetWallScroller (int id, int sidechoice, fixed_t dx, fixed_t dy, int
|
|||
int wallnum = scroller->GetWallNum ();
|
||||
|
||||
if (wallnum >= 0 && sides[wallnum].linedef->id == id &&
|
||||
sides[wallnum].linedef->sidenum[sidechoice] == (DWORD)wallnum &&
|
||||
int(sides[wallnum].linedef->sidedef[sidechoice] - sides) == wallnum &&
|
||||
Where == scroller->GetScrollParts())
|
||||
{
|
||||
scroller->Destroy ();
|
||||
|
|
@ -1887,7 +1887,7 @@ static void SetWallScroller (int id, int sidechoice, fixed_t dx, fixed_t dy, int
|
|||
{
|
||||
if ((collect.RefNum = ((DScroller *)collect.Obj)->GetWallNum ()) != -1 &&
|
||||
sides[collect.RefNum].linedef->id == id &&
|
||||
sides[collect.RefNum].linedef->sidenum[sidechoice] == (DWORD)collect.RefNum &&
|
||||
int(sides[collect.RefNum].linedef->sidedef[sidechoice] - sides) == collect.RefNum &&
|
||||
Where == ((DScroller *)collect.Obj)->GetScrollParts())
|
||||
{
|
||||
((DScroller *)collect.Obj)->SetRate (dx, dy);
|
||||
|
|
@ -1902,17 +1902,18 @@ static void SetWallScroller (int id, int sidechoice, fixed_t dx, fixed_t dy, int
|
|||
// Now create scrollers for any walls that don't already have them.
|
||||
while ((linenum = P_FindLineFromID (id, linenum)) >= 0)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i = 0; i < numcollected; i++)
|
||||
if (lines[linenum].sidedef[sidechoice] != NULL)
|
||||
{
|
||||
if ((DWORD)Collection[i].RefNum == lines[linenum].sidenum[sidechoice])
|
||||
break;
|
||||
}
|
||||
if (i == numcollected)
|
||||
{
|
||||
if (lines[linenum].sidenum[sidechoice] != NO_SIDE)
|
||||
int sidenum = int(lines[linenum].sidedef[sidechoice] - sides);
|
||||
unsigned int i;
|
||||
for (i = 0; i < numcollected; i++)
|
||||
{
|
||||
new DScroller (DScroller::sc_side, dx, dy, -1, lines[linenum].sidenum[sidechoice], 0, Where);
|
||||
if (Collection[i].RefNum == sidenum)
|
||||
break;
|
||||
}
|
||||
if (i == numcollected)
|
||||
{
|
||||
new DScroller (DScroller::sc_side, dx, dy, -1, sidenum, 0, Where);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2262,9 +2263,9 @@ FUNC(LS_Line_SetTextureOffset)
|
|||
|
||||
for(int line = -1; (line = P_FindLineFromID (arg0, line)) >= 0; )
|
||||
{
|
||||
if (lines[line].sidenum[arg3] != NO_SIDE)
|
||||
side_t *side = lines[line].sidedef[arg3];
|
||||
if (side != NULL)
|
||||
{
|
||||
side_t *side = &sides[lines[line].sidenum[arg3]];
|
||||
|
||||
if ((arg4&8)==0)
|
||||
{
|
||||
|
|
@ -2313,10 +2314,9 @@ FUNC(LS_Line_SetTextureScale)
|
|||
|
||||
for(int line = -1; (line = P_FindLineFromID (arg0, line)) >= 0; )
|
||||
{
|
||||
if (lines[line].sidenum[arg3] != NO_SIDE)
|
||||
side_t *side = lines[line].sidedef[arg3];
|
||||
if (side != NULL)
|
||||
{
|
||||
side_t *side = &sides[lines[line].sidenum[arg3]];
|
||||
|
||||
if ((arg4&8)==0)
|
||||
{
|
||||
// set
|
||||
|
|
@ -2796,8 +2796,8 @@ FUNC(LS_ClearForceField)
|
|||
{
|
||||
line->flags &= ~(ML_BLOCKING|ML_BLOCKEVERYTHING);
|
||||
line->special = 0;
|
||||
sides[line->sidenum[0]].SetTexture(side_t::mid, FNullTextureID());
|
||||
sides[line->sidenum[1]].SetTexture(side_t::mid, FNullTextureID());
|
||||
line->sidedef[0]->SetTexture(side_t::mid, FNullTextureID());
|
||||
line->sidedef[1]->SetTexture(side_t::mid, FNullTextureID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2811,11 +2811,11 @@ FUNC(LS_GlassBreak)
|
|||
bool quest1, quest2;
|
||||
|
||||
ln->flags &= ~(ML_BLOCKING|ML_BLOCKEVERYTHING);
|
||||
switched = P_ChangeSwitchTexture (&sides[ln->sidenum[0]], false, 0, &quest1);
|
||||
switched = P_ChangeSwitchTexture (ln->sidedef[0], false, 0, &quest1);
|
||||
ln->special = 0;
|
||||
if (ln->sidenum[1] != NO_SIDE)
|
||||
if (ln->sidedef[1] != NULL)
|
||||
{
|
||||
switched |= P_ChangeSwitchTexture (&sides[ln->sidenum[1]], false, 0, &quest2);
|
||||
switched |= P_ChangeSwitchTexture (ln->sidedef[1], false, 0, &quest2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue