mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Update birdslopes to use args
This commit is contained in:
parent
c2cc847746
commit
983304f361
5 changed files with 70 additions and 38 deletions
|
|
@ -11648,7 +11648,7 @@ static boolean P_SpawnNonMobjMapThing(mapthing_t *mthing)
|
|||
return true;
|
||||
}
|
||||
else if (mthing->type == 750 // Slope vertex point (formerly chaos spawn)
|
||||
|| (mthing->type == 777 || mthing->type == 778) // Slope anchors
|
||||
|| (mthing->type == FLOOR_SLOPE_THING || mthing->type == CEILING_SLOPE_THING) // Slope anchors
|
||||
|| (mthing->type >= 600 && mthing->type <= 611) // Special placement patterns
|
||||
|| mthing->type == 1713) // Hoops
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5751,6 +5751,29 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
case 799: //Set dynamic slope vertex to front sector height
|
||||
lines[i].args[0] = !!(lines[i].flags & ML_NOCLIMB);
|
||||
break;
|
||||
case LT_SLOPE_ANCHORS_OLD_FLOOR: //Slope front sector floor by 3 tagged vertices
|
||||
case LT_SLOPE_ANCHORS_OLD_CEILING: //Slope front sector ceiling by 3 tagged vertices
|
||||
case LT_SLOPE_ANCHORS_OLD: //Slope back sector floor by 3 tagged vertices
|
||||
{
|
||||
if (lines[i].special == LT_SLOPE_ANCHORS_OLD_FLOOR)
|
||||
lines[i].args[0] = TMSA_FLOOR;
|
||||
else if (lines[i].special == LT_SLOPE_ANCHORS_OLD_CEILING)
|
||||
lines[i].args[0] = TMSA_CEILING;
|
||||
else if (lines[i].special == LT_SLOPE_ANCHORS_OLD)
|
||||
lines[i].args[0] = (TMSA_FLOOR|TMSA_CEILING);
|
||||
|
||||
if (lines[i].flags & ML_NETONLY)
|
||||
lines[i].args[1] |= TMSAF_NOPHYSICS;
|
||||
if (lines[i].flags & ML_NONET)
|
||||
lines[i].args[1] |= TMSAF_DYNAMIC;
|
||||
if (lines[i].flags & ML_NOCLIMB)
|
||||
lines[i].args[1] |= TMSAF_BACKSIDE;
|
||||
if (lines[i].flags & ML_BLOCKMONSTERS)
|
||||
lines[i].args[1] |= TMSAF_MIRROR;
|
||||
|
||||
lines[i].special = LT_SLOPE_ANCHORS;
|
||||
break;
|
||||
}
|
||||
case 909: //Fog wall
|
||||
lines[i].blendmode = AST_FOG;
|
||||
break;
|
||||
|
|
@ -6545,6 +6568,10 @@ static void P_ConvertBinaryThingTypes(void)
|
|||
mapthings[i].args[2] |= TMBCF_BACKANDFORTH;
|
||||
}
|
||||
break;
|
||||
case FLOOR_SLOPE_THING:
|
||||
case CEILING_SLOPE_THING:
|
||||
Tag_FSet(&mapthings[i].tags, mapthings[i].extrainfo);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,20 @@ typedef enum
|
|||
TMSL_COPY = 1<<2,
|
||||
} textmapslopeflags_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMSA_FLOOR = 1,
|
||||
TMSA_CEILING = 1<<1,
|
||||
} textmapslopeanchor_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMSAF_NOPHYSICS = 1,
|
||||
TMSAF_DYNAMIC = 1<<1,
|
||||
TMSAF_BACKSIDE = 1<<2,
|
||||
TMSAF_MIRROR = 1<<3,
|
||||
} textmapslopeanchorflags_t;
|
||||
|
||||
void P_LinkSlopeThinkers (void);
|
||||
|
||||
void P_UpdateSlopeLightOffset(pslope_t *slope);
|
||||
|
|
|
|||
|
|
@ -1119,9 +1119,12 @@ void P_CalcHeight(player_t *player);
|
|||
/* line specials */
|
||||
enum
|
||||
{
|
||||
LT_SLOPE_ANCHORS_FLOOR = 777,
|
||||
LT_SLOPE_ANCHORS_CEILING = 778,
|
||||
LT_SLOPE_ANCHORS = 779,
|
||||
LT_SLOPE_ANCHORS = 777,
|
||||
|
||||
// binary converter
|
||||
LT_SLOPE_ANCHORS_OLD_FLOOR = 777,
|
||||
LT_SLOPE_ANCHORS_OLD_CEILING = 778,
|
||||
LT_SLOPE_ANCHORS_OLD = 779,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ get_anchor
|
|||
|
||||
for (i = 0; i < list->count; ++i)
|
||||
{
|
||||
if (list->points[i] == v && list->anchors[i]->extrainfo == tag)
|
||||
if (list->points[i] == v && Tag_FGet(&list->anchors[i]->tags) == tag)
|
||||
{
|
||||
for (k = 0; k < 3; ++k)
|
||||
{
|
||||
|
|
@ -347,12 +347,12 @@ new_vertex_slope
|
|||
{anchors[2]->x << FRACBITS, anchors[2]->y << FRACBITS, anchors[2]->z << FRACBITS}
|
||||
};
|
||||
|
||||
if (flags & ML_NETONLY)
|
||||
if (flags & TMSAF_NOPHYSICS)
|
||||
{
|
||||
slope->flags |= SL_NOPHYSICS;
|
||||
}
|
||||
|
||||
if (flags & ML_NONET)
|
||||
if (flags & TMSAF_DYNAMIC)
|
||||
{
|
||||
slope->flags |= SL_DYNAMIC;
|
||||
}
|
||||
|
|
@ -410,8 +410,8 @@ slope_sector
|
|||
{
|
||||
(*slope) = new_vertex_slope(anchors, flags);
|
||||
|
||||
/* Effect 6 - invert slope to opposite side */
|
||||
if (flags & ML_BLOCKMONSTERS)
|
||||
/* invert slope to opposite side */
|
||||
if (flags & TMSAF_MIRROR)
|
||||
{
|
||||
(*alt) = new_vertex_slope(flip_slope(anchors, sector), flags);
|
||||
}
|
||||
|
|
@ -426,36 +426,30 @@ make_anchored_slope
|
|||
const line_t * line,
|
||||
const int plane
|
||||
){
|
||||
enum
|
||||
{
|
||||
FLOOR = 0x1,
|
||||
CEILING = 0x2,
|
||||
};
|
||||
INT16 flags = line->args[1];
|
||||
|
||||
INT16 flags = line->flags;
|
||||
|
||||
const int side = ( flags & ML_NOCLIMB ) != 0;
|
||||
const int side = ( flags & TMSAF_BACKSIDE ) != 0;
|
||||
|
||||
sector_t * s;
|
||||
|
||||
mtag_t tag = Tag_FGet(&line->tags);
|
||||
|
||||
if (side == 0 || flags & ML_TWOSIDED)
|
||||
if (side == 0 || (line->flags & ML_TWOSIDED))
|
||||
{
|
||||
s = sides[line->sidenum[side]].sector;
|
||||
|
||||
if (plane == (FLOOR|CEILING))
|
||||
if (plane == (TMSA_FLOOR|TMSA_CEILING))
|
||||
{
|
||||
flags &= ~ML_BLOCKMONSTERS;
|
||||
flags &= ~TMSAF_MIRROR;
|
||||
}
|
||||
|
||||
if (plane & FLOOR)
|
||||
if (plane & TMSA_FLOOR)
|
||||
{
|
||||
slope_sector
|
||||
(&s->f_slope, &s->c_slope, s, flags, &floor_anchors, tag);
|
||||
}
|
||||
|
||||
if (plane & CEILING)
|
||||
if (plane & TMSA_CEILING)
|
||||
{
|
||||
slope_sector
|
||||
(&s->c_slope, &s->f_slope, s, flags, &ceiling_anchors, tag);
|
||||
|
|
@ -469,27 +463,21 @@ static void P_BuildSlopeAnchorList (void) {
|
|||
}
|
||||
|
||||
static void P_SetupAnchoredSlopes (void) {
|
||||
enum
|
||||
{
|
||||
FLOOR = 0x1,
|
||||
CEILING = 0x2,
|
||||
};
|
||||
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < numlines; ++i)
|
||||
{
|
||||
if (lines[i].special == LT_SLOPE_ANCHORS_FLOOR)
|
||||
if (lines[i].special == LT_SLOPE_ANCHORS)
|
||||
{
|
||||
make_anchored_slope(&lines[i], FLOOR);
|
||||
}
|
||||
else if (lines[i].special == LT_SLOPE_ANCHORS_CEILING)
|
||||
{
|
||||
make_anchored_slope(&lines[i], CEILING);
|
||||
}
|
||||
else if (lines[i].special == LT_SLOPE_ANCHORS)
|
||||
{
|
||||
make_anchored_slope(&lines[i], FLOOR|CEILING);
|
||||
int plane = (lines[i].args[0] & (TMSA_FLOOR|TMSA_CEILING));
|
||||
|
||||
if (plane == 0)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "Slope anchor linedef %u has no planes set.\n", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
make_anchored_slope(&lines[i], plane);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue