mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-08 09:51:45 +00:00
Merge branch 'next' into gfz3laser-mkii
This commit is contained in:
commit
f533535db7
9 changed files with 271 additions and 467 deletions
|
|
@ -760,6 +760,7 @@ linedeftypes
|
||||||
{
|
{
|
||||||
title = "Parameters";
|
title = "Parameters";
|
||||||
prefix = "(22)";
|
prefix = "(22)";
|
||||||
|
flags8text = "[3] Set translucency by X offset";
|
||||||
flags32text = "[5] Render outer sides only";
|
flags32text = "[5] Render outer sides only";
|
||||||
flags64text = "[6] Trigger linedef executor";
|
flags64text = "[6] Trigger linedef executor";
|
||||||
flags128text = "[7] Intangible";
|
flags128text = "[7] Intangible";
|
||||||
|
|
@ -2245,6 +2246,13 @@ linedeftypes
|
||||||
title = "Dye Object";
|
title = "Dye Object";
|
||||||
prefix = "(463)";
|
prefix = "(463)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
464
|
||||||
|
{
|
||||||
|
title = "Trigger Egg Capsule";
|
||||||
|
prefix = "(464)";
|
||||||
|
flags64text = "[6] Don't end level";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
linedefexecmisc
|
linedefexecmisc
|
||||||
|
|
@ -3731,6 +3739,7 @@ thingtypes
|
||||||
width = 8;
|
width = 8;
|
||||||
height = 16;
|
height = 16;
|
||||||
sprite = "internal:capsule";
|
sprite = "internal:capsule";
|
||||||
|
angletext = "Tag";
|
||||||
}
|
}
|
||||||
292
|
292
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5062,7 +5062,7 @@ void NetUpdate(void)
|
||||||
|
|
||||||
// In case the cvar value was lowered
|
// In case the cvar value was lowered
|
||||||
if (joindelay)
|
if (joindelay)
|
||||||
joindelay = min(joindelay - 1, 3 * cv_joindelay.value * TICRATE);
|
joindelay = min(joindelay - 1, 3 * (tic_t)cv_joindelay.value * TICRATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
nowtime /= NEWTICRATERATIO;
|
nowtime /= NEWTICRATERATIO;
|
||||||
|
|
|
||||||
|
|
@ -1863,6 +1863,12 @@ static void readlevelheader(MYFILE *f, INT32 num)
|
||||||
}
|
}
|
||||||
else if (fastcmp(word, "STARTRINGS"))
|
else if (fastcmp(word, "STARTRINGS"))
|
||||||
mapheaderinfo[num-1]->startrings = (UINT16)i;
|
mapheaderinfo[num-1]->startrings = (UINT16)i;
|
||||||
|
else if (fastcmp(word, "SPECIALSTAGETIME"))
|
||||||
|
mapheaderinfo[num-1]->sstimer = i;
|
||||||
|
else if (fastcmp(word, "SPECIALSTAGESPHERES"))
|
||||||
|
mapheaderinfo[num-1]->ssspheres = i;
|
||||||
|
else if (fastcmp(word, "GRAVITY"))
|
||||||
|
mapheaderinfo[num-1]->gravity = FLOAT_TO_FIXED(atof(word2));
|
||||||
else
|
else
|
||||||
deh_warning("Level header %d: unknown word '%s'", num, word);
|
deh_warning("Level header %d: unknown word '%s'", num, word);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -319,6 +319,9 @@ typedef struct
|
||||||
|
|
||||||
char selectheading[22]; ///< Level select heading. Allows for controllable grouping.
|
char selectheading[22]; ///< Level select heading. Allows for controllable grouping.
|
||||||
UINT16 startrings; ///< Number of rings players start with.
|
UINT16 startrings; ///< Number of rings players start with.
|
||||||
|
INT32 sstimer; ///< Timer for special stages.
|
||||||
|
UINT32 ssspheres; ///< Sphere requirement in special stages.
|
||||||
|
fixed_t gravity; ///< Map-wide gravity.
|
||||||
|
|
||||||
// Title card.
|
// Title card.
|
||||||
char ltzzpatch[8]; ///< Zig zag patch.
|
char ltzzpatch[8]; ///< Zig zag patch.
|
||||||
|
|
|
||||||
|
|
@ -2082,6 +2082,12 @@ static int mapheaderinfo_get(lua_State *L)
|
||||||
lua_pushinteger(L, header->menuflags);
|
lua_pushinteger(L, header->menuflags);
|
||||||
else if (fastcmp(field,"startrings"))
|
else if (fastcmp(field,"startrings"))
|
||||||
lua_pushinteger(L, header->startrings);
|
lua_pushinteger(L, header->startrings);
|
||||||
|
else if (fastcmp(field, "sstimer"))
|
||||||
|
lua_pushinteger(L, header->sstimer);
|
||||||
|
else if (fastcmp(field, "ssspheres"))
|
||||||
|
lua_pushinteger(L, header->ssspheres);
|
||||||
|
else if (fastcmp(field, "gravity"))
|
||||||
|
lua_pushfixed(L, header->gravity);
|
||||||
// TODO add support for reading numGradedMares and grades
|
// TODO add support for reading numGradedMares and grades
|
||||||
else {
|
else {
|
||||||
// Read custom vars now
|
// Read custom vars now
|
||||||
|
|
|
||||||
519
src/p_polyobj.c
519
src/p_polyobj.c
File diff suppressed because it is too large
Load diff
|
|
@ -29,7 +29,6 @@
|
||||||
#define POLYOBJ_SPAWNCRUSH_DOOMEDNUM 762 // todo: REMOVE
|
#define POLYOBJ_SPAWNCRUSH_DOOMEDNUM 762 // todo: REMOVE
|
||||||
|
|
||||||
#define POLYOBJ_START_LINE 20
|
#define POLYOBJ_START_LINE 20
|
||||||
#define POLYOBJ_EXPLICIT_LINE 21
|
|
||||||
#define POLYINFO_SPECIALNUM 22
|
#define POLYINFO_SPECIALNUM 22
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
@ -299,6 +298,14 @@ typedef struct polyrotdisplacedata_s
|
||||||
UINT8 turnobjs;
|
UINT8 turnobjs;
|
||||||
} polyrotdisplacedata_t;
|
} polyrotdisplacedata_t;
|
||||||
|
|
||||||
|
typedef struct polyflagdata_s
|
||||||
|
{
|
||||||
|
INT32 polyObjNum;
|
||||||
|
INT32 speed;
|
||||||
|
UINT32 angle;
|
||||||
|
fixed_t momx;
|
||||||
|
} polyflagdata_t;
|
||||||
|
|
||||||
typedef struct polyfadedata_s
|
typedef struct polyfadedata_s
|
||||||
{
|
{
|
||||||
INT32 polyObjNum;
|
INT32 polyObjNum;
|
||||||
|
|
@ -320,7 +327,6 @@ boolean P_PointInsidePolyobj(polyobj_t *po, fixed_t x, fixed_t y);
|
||||||
boolean P_MobjTouchingPolyobj(polyobj_t *po, mobj_t *mo);
|
boolean P_MobjTouchingPolyobj(polyobj_t *po, mobj_t *mo);
|
||||||
boolean P_MobjInsidePolyobj(polyobj_t *po, mobj_t *mo);
|
boolean P_MobjInsidePolyobj(polyobj_t *po, mobj_t *mo);
|
||||||
boolean P_BBoxInsidePolyobj(polyobj_t *po, fixed_t *bbox);
|
boolean P_BBoxInsidePolyobj(polyobj_t *po, fixed_t *bbox);
|
||||||
void Polyobj_GetInfo(INT16 poid, INT32 *poflags, INT32 *parentID, INT32 *potrans);
|
|
||||||
|
|
||||||
// thinkers (needed in p_saveg.c)
|
// thinkers (needed in p_saveg.c)
|
||||||
void T_PolyObjRotate(polyrotate_t *);
|
void T_PolyObjRotate(polyrotate_t *);
|
||||||
|
|
@ -333,14 +339,14 @@ void T_PolyObjRotDisplace (polyrotdisplace_t *);
|
||||||
void T_PolyObjFlag (polymove_t *);
|
void T_PolyObjFlag (polymove_t *);
|
||||||
void T_PolyObjFade (polyfade_t *);
|
void T_PolyObjFade (polyfade_t *);
|
||||||
|
|
||||||
INT32 EV_DoPolyDoor(polydoordata_t *);
|
boolean EV_DoPolyDoor(polydoordata_t *);
|
||||||
INT32 EV_DoPolyObjMove(polymovedata_t *);
|
boolean EV_DoPolyObjMove(polymovedata_t *);
|
||||||
INT32 EV_DoPolyObjWaypoint(polywaypointdata_t *);
|
boolean EV_DoPolyObjWaypoint(polywaypointdata_t *);
|
||||||
INT32 EV_DoPolyObjRotate(polyrotdata_t *);
|
boolean EV_DoPolyObjRotate(polyrotdata_t *);
|
||||||
INT32 EV_DoPolyObjDisplace(polydisplacedata_t *);
|
boolean EV_DoPolyObjDisplace(polydisplacedata_t *);
|
||||||
INT32 EV_DoPolyObjRotDisplace(polyrotdisplacedata_t *);
|
boolean EV_DoPolyObjRotDisplace(polyrotdisplacedata_t *);
|
||||||
INT32 EV_DoPolyObjFlag(struct line_s *);
|
boolean EV_DoPolyObjFlag(polyflagdata_t *);
|
||||||
INT32 EV_DoPolyObjFade(polyfadedata_t *);
|
boolean EV_DoPolyObjFade(polyfadedata_t *);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,9 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
|
||||||
mapheaderinfo[num]->typeoflevel = 0;
|
mapheaderinfo[num]->typeoflevel = 0;
|
||||||
mapheaderinfo[num]->nextlevel = (INT16)(i + 1);
|
mapheaderinfo[num]->nextlevel = (INT16)(i + 1);
|
||||||
mapheaderinfo[num]->startrings = 0;
|
mapheaderinfo[num]->startrings = 0;
|
||||||
|
mapheaderinfo[num]->sstimer = 90;
|
||||||
|
mapheaderinfo[num]->ssspheres = 1;
|
||||||
|
mapheaderinfo[num]->gravity = FRACUNIT/2;
|
||||||
mapheaderinfo[num]->keywords[0] = '\0';
|
mapheaderinfo[num]->keywords[0] = '\0';
|
||||||
snprintf(mapheaderinfo[num]->musname, 7, "%sM", G_BuildMapName(i));
|
snprintf(mapheaderinfo[num]->musname, 7, "%sM", G_BuildMapName(i));
|
||||||
mapheaderinfo[num]->musname[6] = 0;
|
mapheaderinfo[num]->musname[6] = 0;
|
||||||
|
|
|
||||||
164
src/p_spec.c
164
src/p_spec.c
|
|
@ -1044,9 +1044,6 @@ static INT32 P_FindLineFromTag(INT32 tag, INT32 start)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// P_FindSpecialLineFromTag
|
|
||||||
//
|
|
||||||
INT32 P_FindSpecialLineFromTag(INT16 special, INT16 tag, INT32 start)
|
INT32 P_FindSpecialLineFromTag(INT16 special, INT16 tag, INT32 start)
|
||||||
{
|
{
|
||||||
if (tag == -1)
|
if (tag == -1)
|
||||||
|
|
@ -1076,11 +1073,8 @@ INT32 P_FindSpecialLineFromTag(INT16 special, INT16 tag, INT32 start)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// PolyDoor
|
|
||||||
//
|
|
||||||
// Parses arguments for parameterized polyobject door types
|
// Parses arguments for parameterized polyobject door types
|
||||||
//
|
|
||||||
static boolean PolyDoor(line_t *line)
|
static boolean PolyDoor(line_t *line)
|
||||||
{
|
{
|
||||||
polydoordata_t pdd;
|
polydoordata_t pdd;
|
||||||
|
|
@ -1117,11 +1111,7 @@ static boolean PolyDoor(line_t *line)
|
||||||
return EV_DoPolyDoor(&pdd);
|
return EV_DoPolyDoor(&pdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// PolyMove
|
|
||||||
//
|
|
||||||
// Parses arguments for parameterized polyobject move specials
|
// Parses arguments for parameterized polyobject move specials
|
||||||
//
|
|
||||||
static boolean PolyMove(line_t *line)
|
static boolean PolyMove(line_t *line)
|
||||||
{
|
{
|
||||||
polymovedata_t pmd;
|
polymovedata_t pmd;
|
||||||
|
|
@ -1136,12 +1126,8 @@ static boolean PolyMove(line_t *line)
|
||||||
return EV_DoPolyObjMove(&pmd);
|
return EV_DoPolyObjMove(&pmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// PolyInvisible
|
|
||||||
//
|
|
||||||
// Makes a polyobject invisible and intangible
|
// Makes a polyobject invisible and intangible
|
||||||
// If NOCLIMB is ticked, the polyobject will still be tangible, just not visible.
|
// If NOCLIMB is ticked, the polyobject will still be tangible, just not visible.
|
||||||
//
|
|
||||||
static void PolyInvisible(line_t *line)
|
static void PolyInvisible(line_t *line)
|
||||||
{
|
{
|
||||||
INT32 polyObjNum = line->tag;
|
INT32 polyObjNum = line->tag;
|
||||||
|
|
@ -1164,12 +1150,8 @@ static void PolyInvisible(line_t *line)
|
||||||
po->flags &= ~POF_RENDERALL;
|
po->flags &= ~POF_RENDERALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// PolyVisible
|
|
||||||
//
|
|
||||||
// Makes a polyobject visible and tangible
|
// Makes a polyobject visible and tangible
|
||||||
// If NOCLIMB is ticked, the polyobject will not be tangible, just visible.
|
// If NOCLIMB is ticked, the polyobject will not be tangible, just visible.
|
||||||
//
|
|
||||||
static void PolyVisible(line_t *line)
|
static void PolyVisible(line_t *line)
|
||||||
{
|
{
|
||||||
INT32 polyObjNum = line->tag;
|
INT32 polyObjNum = line->tag;
|
||||||
|
|
@ -1192,16 +1174,14 @@ static void PolyVisible(line_t *line)
|
||||||
po->flags |= (po->spawnflags & POF_RENDERALL);
|
po->flags |= (po->spawnflags & POF_RENDERALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// PolyTranslucency
|
|
||||||
//
|
|
||||||
// Sets the translucency of a polyobject
|
// Sets the translucency of a polyobject
|
||||||
// Frontsector floor / 100 = translevel
|
// Frontsector floor / 100 = translevel
|
||||||
//
|
|
||||||
static void PolyTranslucency(line_t *line)
|
static void PolyTranslucency(line_t *line)
|
||||||
{
|
{
|
||||||
INT32 polyObjNum = line->tag;
|
INT32 polyObjNum = line->tag;
|
||||||
polyobj_t *po;
|
polyobj_t *po;
|
||||||
|
INT32 value;
|
||||||
|
|
||||||
if (!(po = Polyobj_GetForNum(polyObjNum)))
|
if (!(po = Polyobj_GetForNum(polyObjNum)))
|
||||||
{
|
{
|
||||||
|
|
@ -1213,37 +1193,28 @@ static void PolyTranslucency(line_t *line)
|
||||||
if (po->isBad)
|
if (po->isBad)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// if DONTPEGBOTTOM, specify raw translucency value in Front X Offset
|
// If Front X Offset is specified, use that. Else, use floorheight.
|
||||||
// else, take it out of 1000. If Front X Offset is specified, use that. Else, use floorheight.
|
value = (sides[line->sidenum[0]].textureoffset ? sides[line->sidenum[0]].textureoffset : line->frontsector->floorheight) >> FRACBITS;
|
||||||
|
|
||||||
|
// If DONTPEGBOTTOM, specify raw translucency value. Else, take it out of 1000.
|
||||||
|
if (!(line->flags & ML_DONTPEGBOTTOM))
|
||||||
|
value /= 100;
|
||||||
|
|
||||||
if (line->flags & ML_EFFECT3) // relative calc
|
if (line->flags & ML_EFFECT3) // relative calc
|
||||||
po->translucency = max(min(po->translucency + ((line->flags & ML_DONTPEGBOTTOM) ?
|
po->translucency += value;
|
||||||
(sides[line->sidenum[0]].textureoffset ?
|
|
||||||
max(min(sides[line->sidenum[0]].textureoffset>>FRACBITS, NUMTRANSMAPS), -NUMTRANSMAPS)
|
|
||||||
: max(min(line->frontsector->floorheight>>FRACBITS, NUMTRANSMAPS), -NUMTRANSMAPS))
|
|
||||||
: (sides[line->sidenum[0]].textureoffset ?
|
|
||||||
max(min(sides[line->sidenum[0]].textureoffset>>FRACBITS, 1000), -1000) / 100
|
|
||||||
: max(min(line->frontsector->floorheight>>FRACBITS, 1000), -1000) / 100)),
|
|
||||||
NUMTRANSMAPS), 0);
|
|
||||||
else
|
else
|
||||||
po->translucency = (line->flags & ML_DONTPEGBOTTOM) ?
|
po->translucency = value;
|
||||||
(sides[line->sidenum[0]].textureoffset ?
|
|
||||||
max(min(sides[line->sidenum[0]].textureoffset>>FRACBITS, NUMTRANSMAPS), 0)
|
po->translucency = max(min(po->translucency, NUMTRANSMAPS), 0);
|
||||||
: max(min(line->frontsector->floorheight>>FRACBITS, NUMTRANSMAPS), 0))
|
|
||||||
: (sides[line->sidenum[0]].textureoffset ?
|
|
||||||
max(min(sides[line->sidenum[0]].textureoffset>>FRACBITS, 1000), 0) / 100
|
|
||||||
: max(min(line->frontsector->floorheight>>FRACBITS, 1000), 0) / 100);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// PolyFade
|
|
||||||
//
|
|
||||||
// Makes a polyobject translucency fade and applies tangibility
|
// Makes a polyobject translucency fade and applies tangibility
|
||||||
//
|
|
||||||
static boolean PolyFade(line_t *line)
|
static boolean PolyFade(line_t *line)
|
||||||
{
|
{
|
||||||
INT32 polyObjNum = line->tag;
|
INT32 polyObjNum = line->tag;
|
||||||
polyobj_t *po;
|
polyobj_t *po;
|
||||||
polyfadedata_t pfd;
|
polyfadedata_t pfd;
|
||||||
|
INT32 value;
|
||||||
|
|
||||||
if (!(po = Polyobj_GetForNum(polyObjNum)))
|
if (!(po = Polyobj_GetForNum(polyObjNum)))
|
||||||
{
|
{
|
||||||
|
|
@ -1266,25 +1237,19 @@ static boolean PolyFade(line_t *line)
|
||||||
|
|
||||||
pfd.polyObjNum = polyObjNum;
|
pfd.polyObjNum = polyObjNum;
|
||||||
|
|
||||||
// if DONTPEGBOTTOM, specify raw translucency value in Front X Offset
|
// If Front X Offset is specified, use that. Else, use floorheight.
|
||||||
// else, take it out of 1000. If Front X Offset is specified, use that. Else, use floorheight.
|
value = (sides[line->sidenum[0]].textureoffset ? sides[line->sidenum[0]].textureoffset : line->frontsector->floorheight) >> FRACBITS;
|
||||||
|
|
||||||
|
// If DONTPEGBOTTOM, specify raw translucency value. Else, take it out of 1000.
|
||||||
|
if (!(line->flags & ML_DONTPEGBOTTOM))
|
||||||
|
value /= 100;
|
||||||
|
|
||||||
if (line->flags & ML_EFFECT3) // relative calc
|
if (line->flags & ML_EFFECT3) // relative calc
|
||||||
pfd.destvalue = max(min(po->translucency + ((line->flags & ML_DONTPEGBOTTOM) ?
|
pfd.destvalue = po->translucency + value;
|
||||||
(sides[line->sidenum[0]].textureoffset ?
|
|
||||||
max(min(sides[line->sidenum[0]].textureoffset>>FRACBITS, NUMTRANSMAPS), -NUMTRANSMAPS)
|
|
||||||
: max(min(line->frontsector->floorheight>>FRACBITS, NUMTRANSMAPS), -NUMTRANSMAPS))
|
|
||||||
: (sides[line->sidenum[0]].textureoffset ?
|
|
||||||
max(min(sides[line->sidenum[0]].textureoffset>>FRACBITS, 1000), -1000) / 100
|
|
||||||
: max(min(line->frontsector->floorheight>>FRACBITS, 1000), -1000) / 100)),
|
|
||||||
NUMTRANSMAPS), 0);
|
|
||||||
else
|
else
|
||||||
pfd.destvalue = (line->flags & ML_DONTPEGBOTTOM) ?
|
pfd.destvalue = value;
|
||||||
(sides[line->sidenum[0]].textureoffset ?
|
|
||||||
max(min(sides[line->sidenum[0]].textureoffset>>FRACBITS, NUMTRANSMAPS), 0)
|
pfd.destvalue = max(min(pfd.destvalue, NUMTRANSMAPS), 0);
|
||||||
: max(min(line->frontsector->floorheight>>FRACBITS, NUMTRANSMAPS), 0))
|
|
||||||
: (sides[line->sidenum[0]].textureoffset ?
|
|
||||||
max(min(sides[line->sidenum[0]].textureoffset>>FRACBITS, 1000), 0) / 100
|
|
||||||
: max(min(line->frontsector->floorheight>>FRACBITS, 1000), 0) / 100);
|
|
||||||
|
|
||||||
// already equal, nothing to do
|
// already equal, nothing to do
|
||||||
if (po->translucency == pfd.destvalue)
|
if (po->translucency == pfd.destvalue)
|
||||||
|
|
@ -1303,11 +1268,7 @@ static boolean PolyFade(line_t *line)
|
||||||
return EV_DoPolyObjFade(&pfd);
|
return EV_DoPolyObjFade(&pfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// PolyWaypoint
|
|
||||||
//
|
|
||||||
// Parses arguments for parameterized polyobject waypoint movement
|
// Parses arguments for parameterized polyobject waypoint movement
|
||||||
//
|
|
||||||
static boolean PolyWaypoint(line_t *line)
|
static boolean PolyWaypoint(line_t *line)
|
||||||
{
|
{
|
||||||
polywaypointdata_t pwd;
|
polywaypointdata_t pwd;
|
||||||
|
|
@ -1323,11 +1284,7 @@ static boolean PolyWaypoint(line_t *line)
|
||||||
return EV_DoPolyObjWaypoint(&pwd);
|
return EV_DoPolyObjWaypoint(&pwd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// PolyRotate
|
|
||||||
//
|
|
||||||
// Parses arguments for parameterized polyobject rotate specials
|
// Parses arguments for parameterized polyobject rotate specials
|
||||||
//
|
|
||||||
static boolean PolyRotate(line_t *line)
|
static boolean PolyRotate(line_t *line)
|
||||||
{
|
{
|
||||||
polyrotdata_t prd;
|
polyrotdata_t prd;
|
||||||
|
|
@ -1352,11 +1309,20 @@ static boolean PolyRotate(line_t *line)
|
||||||
return EV_DoPolyObjRotate(&prd);
|
return EV_DoPolyObjRotate(&prd);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// Parses arguments for polyobject flag waving special
|
||||||
// PolyDisplace
|
static boolean PolyFlag(line_t *line)
|
||||||
//
|
{
|
||||||
|
polyflagdata_t pfd;
|
||||||
|
|
||||||
|
pfd.polyObjNum = line->tag;
|
||||||
|
pfd.speed = P_AproxDistance(line->dx, line->dy) >> FRACBITS;
|
||||||
|
pfd.angle = R_PointToAngle2(line->v1->x, line->v1->y, line->v2->x, line->v2->y) >> ANGLETOFINESHIFT;
|
||||||
|
pfd.momx = sides[line->sidenum[0]].textureoffset >> FRACBITS;
|
||||||
|
|
||||||
|
return EV_DoPolyObjFlag(&pfd);
|
||||||
|
}
|
||||||
|
|
||||||
// Parses arguments for parameterized polyobject move-by-sector-heights specials
|
// Parses arguments for parameterized polyobject move-by-sector-heights specials
|
||||||
//
|
|
||||||
static boolean PolyDisplace(line_t *line)
|
static boolean PolyDisplace(line_t *line)
|
||||||
{
|
{
|
||||||
polydisplacedata_t pdd;
|
polydisplacedata_t pdd;
|
||||||
|
|
@ -1371,8 +1337,7 @@ static boolean PolyDisplace(line_t *line)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Similar to PolyDisplace().
|
// Parses arguments for parameterized polyobject rotate-by-sector-heights specials
|
||||||
*/
|
|
||||||
static boolean PolyRotDisplace(line_t *line)
|
static boolean PolyRotDisplace(line_t *line)
|
||||||
{
|
{
|
||||||
polyrotdisplacedata_t pdd;
|
polyrotdisplacedata_t pdd;
|
||||||
|
|
@ -4005,6 +3970,47 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 464: // Trigger Egg Capsule
|
||||||
|
{
|
||||||
|
thinker_t *th;
|
||||||
|
mobj_t *mo2;
|
||||||
|
|
||||||
|
// Find the center of the Eggtrap and release all the pretty animals!
|
||||||
|
// The chimps are my friends.. heeheeheheehehee..... - LouisJM
|
||||||
|
for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next)
|
||||||
|
{
|
||||||
|
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
mo2 = (mobj_t *)th;
|
||||||
|
|
||||||
|
if (mo2->type != MT_EGGTRAP)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!mo2->spawnpoint)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (mo2->spawnpoint->angle != line->tag)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
P_KillMobj(mo2, NULL, mo, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(line->flags & ML_NOCLIMB))
|
||||||
|
{
|
||||||
|
INT32 i;
|
||||||
|
|
||||||
|
// Mark all players with the time to exit thingy!
|
||||||
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (!playeringame[i])
|
||||||
|
continue;
|
||||||
|
P_DoPlayerExit(&players[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 480: // Polyobj_DoorSlide
|
case 480: // Polyobj_DoorSlide
|
||||||
case 481: // Polyobj_DoorSwing
|
case 481: // Polyobj_DoorSwing
|
||||||
PolyDoor(line);
|
PolyDoor(line);
|
||||||
|
|
@ -6246,11 +6252,11 @@ static void P_RunLevelLoadExecutors(void)
|
||||||
void P_InitSpecials(void)
|
void P_InitSpecials(void)
|
||||||
{
|
{
|
||||||
// Set the default gravity. Custom gravity overrides this setting.
|
// Set the default gravity. Custom gravity overrides this setting.
|
||||||
gravity = FRACUNIT/2;
|
gravity = mapheaderinfo[gamemap-1]->gravity;
|
||||||
|
|
||||||
// Defaults in case levels don't have them set.
|
// Defaults in case levels don't have them set.
|
||||||
sstimer = 90*TICRATE + 6;
|
sstimer = mapheaderinfo[gamemap-1]->sstimer*TICRATE + 6;
|
||||||
ssspheres = 1;
|
ssspheres = mapheaderinfo[gamemap-1]->ssspheres;
|
||||||
|
|
||||||
CheckForBustableBlocks = CheckForBouncySector = CheckForQuicksand = CheckForMarioBlocks = CheckForFloatBob = CheckForReverseGravity = false;
|
CheckForBustableBlocks = CheckForBouncySector = CheckForQuicksand = CheckForMarioBlocks = CheckForFloatBob = CheckForReverseGravity = false;
|
||||||
|
|
||||||
|
|
@ -7282,7 +7288,7 @@ void P_SpawnSpecials(boolean fromnetsave)
|
||||||
switch (lines[i].special)
|
switch (lines[i].special)
|
||||||
{
|
{
|
||||||
case 30: // Polyobj_Flag
|
case 30: // Polyobj_Flag
|
||||||
EV_DoPolyObjFlag(&lines[i]);
|
PolyFlag(&lines[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 31: // Polyobj_Displace
|
case 31: // Polyobj_Displace
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue