mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
some trivial mapster tweaks
git-svn-id: https://svn.eduke32.com/eduke32@2787 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2d324c97be
commit
9dbf439f45
1 changed files with 17 additions and 10 deletions
|
@ -132,7 +132,11 @@ int16_t prefixtiles[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
|
||||||
uint8_t hlsectorbitmap[MAXSECTORS>>3]; // show2dsector is already taken...
|
uint8_t hlsectorbitmap[MAXSECTORS>>3]; // show2dsector is already taken...
|
||||||
static int32_t minhlsectorfloorz, numhlsecwalls;
|
static int32_t minhlsectorfloorz, numhlsecwalls;
|
||||||
|
|
||||||
static uint8_t visited[MAXWALLS>>3]; // used for AlignWalls and trace_loop
|
// used for:
|
||||||
|
// - hl_all_bunch_sectors_p
|
||||||
|
// - AlignWalls
|
||||||
|
// - trace_loop
|
||||||
|
static uint8_t visited[MAXWALLS>>3];
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -10046,10 +10050,10 @@ static void initcrc(void)
|
||||||
|
|
||||||
static int32_t GetWallBaseZ(int32_t wallnum)
|
static int32_t GetWallBaseZ(int32_t wallnum)
|
||||||
{
|
{
|
||||||
int32_t z=0, sectnum, nextsec;
|
int32_t z=0;
|
||||||
|
|
||||||
sectnum = sectorofwall(wallnum);
|
const int32_t sectnum = sectorofwall(wallnum);
|
||||||
nextsec = wall[wallnum].nextsector;
|
const int32_t nextsec = wall[wallnum].nextsector;
|
||||||
|
|
||||||
if (nextsec == -1) //1-sided wall
|
if (nextsec == -1) //1-sided wall
|
||||||
{
|
{
|
||||||
|
@ -10070,7 +10074,8 @@ static int32_t GetWallBaseZ(int32_t wallnum)
|
||||||
z = sector[nextsec].floorz; //bottom step
|
z = sector[nextsec].floorz; //bottom step
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(z);
|
|
||||||
|
return z;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AlignWalls(int32_t w0, int32_t z0, int32_t w1, int32_t z1, int32_t doxpanning)
|
static void AlignWalls(int32_t w0, int32_t z0, int32_t w1, int32_t z1, int32_t doxpanning)
|
||||||
|
@ -10106,7 +10111,7 @@ void AlignWallPoint2(int32_t w0)
|
||||||
// 8: align TROR nextwalls
|
// 8: align TROR nextwalls
|
||||||
int32_t AutoAlignWalls(int32_t w0, uint32_t flags, int32_t nrecurs)
|
int32_t AutoAlignWalls(int32_t w0, uint32_t flags, int32_t nrecurs)
|
||||||
{
|
{
|
||||||
int32_t z0, z1, tilenum, w1, visible, nextsec, sectnum;
|
int32_t z0, z1, tilenum, w1;
|
||||||
static int32_t numaligned, wall0, cstat0;
|
static int32_t numaligned, wall0, cstat0;
|
||||||
static uint32_t lenrepquot;
|
static uint32_t lenrepquot;
|
||||||
|
|
||||||
|
@ -10156,24 +10161,26 @@ int32_t AutoAlignWalls(int32_t w0, uint32_t flags, int32_t nrecurs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//break if reached back of left wall
|
//break if reached back of left wall
|
||||||
if (wall[w1].nextwall == w0)
|
if (wall[w1].nextwall == w0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (wall[w1].picnum == tilenum)
|
if (wall[w1].picnum == tilenum)
|
||||||
{
|
{
|
||||||
z1 = GetWallBaseZ(w1);
|
int32_t visible = 0;
|
||||||
visible = 0;
|
const int32_t nextsec = wall[w1].nextsector;
|
||||||
|
|
||||||
|
z1 = GetWallBaseZ(w1);
|
||||||
|
|
||||||
nextsec = wall[w1].nextsector;
|
|
||||||
if (nextsec < 0)
|
if (nextsec < 0)
|
||||||
visible = 1;
|
visible = 1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int32_t cz,fz, czn,fzn;
|
int32_t cz,fz, czn,fzn;
|
||||||
|
const int32_t sectnum = NEXTWALL(w1).nextsector;
|
||||||
|
|
||||||
//ignore two sided walls that have no visible face
|
//ignore two sided walls that have no visible face
|
||||||
sectnum = NEXTWALL(w1).nextsector;
|
|
||||||
getzsofslope(sectnum, wall[w1].x,wall[w1].y, &cz, &fz);
|
getzsofslope(sectnum, wall[w1].x,wall[w1].y, &cz, &fz);
|
||||||
getzsofslope(nextsec, wall[w1].x,wall[w1].y, &czn, &fzn);
|
getzsofslope(nextsec, wall[w1].x,wall[w1].y, &czn, &fzn);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue