mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Disable linedef executors in UDMF maps
This commit is contained in:
parent
5b147f59ed
commit
0601579af3
4 changed files with 75 additions and 58 deletions
21
src/p_mobj.c
21
src/p_mobj.c
|
|
@ -2779,6 +2779,9 @@ static boolean P_PlayerPolyObjectZMovement(mobj_t *mo)
|
|||
if ((mo->z == polysec->ceilingheight || mo->z + mo->height == polysec->floorheight) && po->thinker)
|
||||
stopmovecut = true;
|
||||
|
||||
if (udmf)
|
||||
continue;
|
||||
|
||||
if (!(po->flags & POF_LDEXEC))
|
||||
continue;
|
||||
|
||||
|
|
@ -9810,11 +9813,16 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
P_SetTarget(&tm.floorthing, NULL);
|
||||
P_SetTarget(&tm.hitthing, NULL);
|
||||
|
||||
// Check for sector special actions
|
||||
P_CheckMobjTouchingSectorActions(mobj);
|
||||
|
||||
// Sector flag MSF_TRIGGERLINE_MOBJ allows ANY mobj to trigger a linedef exec
|
||||
P_CheckMobjTrigger(mobj, false);
|
||||
if (udmf)
|
||||
{
|
||||
// Check for sector special actions
|
||||
P_CheckMobjTouchingSectorActions(mobj);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Sector flag MSF_TRIGGERLINE_MOBJ allows ANY mobj to trigger a linedef exec
|
||||
P_CheckMobjTrigger(mobj, false);
|
||||
}
|
||||
|
||||
if (mobj->scale != mobj->destscale)
|
||||
P_MobjScaleThink(mobj); // Slowly scale up/down to reach your destscale.
|
||||
|
|
@ -10102,7 +10110,8 @@ void P_PushableThinker(mobj_t *mobj)
|
|||
I_Assert(mobj != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(mobj));
|
||||
|
||||
P_CheckMobjTrigger(mobj, true);
|
||||
if (!udmf)
|
||||
P_CheckMobjTrigger(mobj, true);
|
||||
|
||||
// it has to be pushable RIGHT NOW for this part to happen
|
||||
if (mobj->flags & MF_PUSHABLE && !(mobj->momx || mobj->momy))
|
||||
|
|
|
|||
|
|
@ -242,7 +242,8 @@ static void Polyobj_GetInfo(polyobj_t *po, line_t *line)
|
|||
if (line->args[3] & TMPF_CRUSH)
|
||||
po->damage = 3;
|
||||
|
||||
po->triggertag = line->args[4];
|
||||
if (!udmf)
|
||||
po->triggertag = line->args[4];
|
||||
}
|
||||
|
||||
// Reallocating array maintenance
|
||||
|
|
|
|||
|
|
@ -1482,10 +1482,6 @@ static void ParseTextmapSectorParameter(UINT32 i, const char *param, const char
|
|||
sectors[i].flags |= MSF_TRIGGERSPECIAL_TOUCH;
|
||||
else if (fastcmp(param, "triggerspecial_headbump") && fastcmp("true", val))
|
||||
sectors[i].flags |= MSF_TRIGGERSPECIAL_HEADBUMP;
|
||||
else if (fastcmp(param, "triggerline_plane") && fastcmp("true", val))
|
||||
sectors[i].flags |= MSF_TRIGGERLINE_PLANE;
|
||||
else if (fastcmp(param, "triggerline_mobj") && fastcmp("true", val))
|
||||
sectors[i].flags |= MSF_TRIGGERLINE_MOBJ;
|
||||
else if (fastcmp(param, "invertprecip") && fastcmp("true", val))
|
||||
sectors[i].flags |= MSF_INVERTPRECIP;
|
||||
else if (fastcmp(param, "gravityflip") && fastcmp("true", val))
|
||||
|
|
@ -1533,10 +1529,6 @@ static void ParseTextmapSectorParameter(UINT32 i, const char *param, const char
|
|||
if (fastcmp(val, "Instakill"))
|
||||
sectors[i].damagetype = SD_INSTAKILL;
|
||||
}
|
||||
else if (fastcmp(param, "triggertag"))
|
||||
sectors[i].triggertag = atol(val);
|
||||
else if (fastcmp(param, "triggerer"))
|
||||
sectors[i].triggerer = atol(val);
|
||||
else if (fastcmp(param, "action"))
|
||||
sectors[i].action = atol(val);
|
||||
else if (fastncmp(param, "stringarg", 9) && strlen(param) > 9)
|
||||
|
|
@ -1650,8 +1642,6 @@ static void ParseTextmapLinedefParameter(UINT32 i, const char *param, const char
|
|||
if (fastcmp(val, "fog"))
|
||||
lines[i].blendmode = AST_FOG;
|
||||
}
|
||||
else if (fastcmp(param, "executordelay"))
|
||||
lines[i].executordelay = atol(val);
|
||||
|
||||
// Flags
|
||||
else if (fastcmp(param, "blocking") && fastcmp("true", val))
|
||||
|
|
@ -2073,8 +2063,16 @@ static void P_WriteTextmap(void)
|
|||
break;
|
||||
}
|
||||
|
||||
if (wlines[i].special >= 300 && wlines[i].special < 400 && wlines[i].flags & ML_WRAPMIDTEX)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef executor trigger linedef %s has disregard order flag, which is not supported in UDMF.\n"), sizeu1(i));
|
||||
if (wlines[i].special >= 300 && wlines[i].special < 400)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %s is a linedef executor, which is not supported in UDMF. Use ACS instead.\n"), sizeu1(i));
|
||||
wlines[i].special = 0;
|
||||
}
|
||||
|
||||
if (wlines[i].executordelay != 0)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %s has an linedef executor delay, which is not supported in UDMF. Use ACS instead.\n"), sizeu1(i));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
|
|
@ -2090,7 +2088,7 @@ static void P_WriteTextmap(void)
|
|||
{
|
||||
case 9:
|
||||
case 10:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has ring drainer effect, which is not supported in UDMF. Use linedef type 462 instead.\n"), sizeu1(i));
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has ring drainer effect, which is not supported in UDMF. Use action 462 instead.\n"), sizeu1(i));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -2099,17 +2097,30 @@ static void P_WriteTextmap(void)
|
|||
switch (GETSECSPECIAL(wsectors[i].special, 2))
|
||||
{
|
||||
case 6:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has emerald check trigger type, which is not supported in UDMF. Use linedef types 337-339 instead.\n"), sizeu1(i));
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has emerald check trigger type, which is not supported in UDMF. Use ACS instead.\n"), sizeu1(i));
|
||||
break;
|
||||
case 7:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has NiGHTS mare trigger type, which is not supported in UDMF. Use linedef types 340-342 instead.\n"), sizeu1(i));
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has NiGHTS mare trigger type, which is not supported in UDMF. Use ACS instead.\n"), sizeu1(i));
|
||||
break;
|
||||
case 9:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has Egg Capsule type, which is not supported in UDMF. Use linedef type 464 instead.\n"), sizeu1(i));
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has Egg Capsule type, which is not supported in UDMF. Use action 464 instead.\n"), sizeu1(i));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (wsectors[i].triggertag)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s uses a linedef executor trigger tag, which is not supported in UDMF. Use ACS instead.\n"), sizeu1(i));
|
||||
}
|
||||
if (wsectors[i].triggerer)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s uses a linedef executor trigger effect, which is not supported in UDMF. Use ACS instead.\n"), sizeu1(i));
|
||||
}
|
||||
if ((wsectors[i].flags & (MSF_TRIGGERLINE_PLANE|MSF_TRIGGERLINE_MOBJ)) != 0)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s uses a linedef executor trigger flag, which is not supported in UDMF. Use ACS instead.\n"), sizeu1(i));
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(f, "namespace = \"srb2\";\n");
|
||||
|
|
@ -2228,11 +2239,6 @@ static void P_WriteTextmap(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (wlines[i].executordelay != 0 && wlines[i].backsector)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %s has an executor delay. Changes to the delay at runtime will not be reflected in the converted map. Use linedef type 465 for this.\n"), sizeu1(i));
|
||||
fprintf(f, "executordelay = %d;\n", (wlines[i].backsector->ceilingheight >> FRACBITS) + (wlines[i].backsector->floorheight >> FRACBITS));
|
||||
}
|
||||
if (wlines[i].flags & ML_IMPASSABLE)
|
||||
fprintf(f, "blocking = true;\n");
|
||||
if (wlines[i].flags & ML_BLOCKPLAYERS)
|
||||
|
|
@ -2383,10 +2389,6 @@ static void P_WriteTextmap(void)
|
|||
fprintf(f, "triggerspecial_touch = true;\n");
|
||||
if (wsectors[i].flags & MSF_TRIGGERSPECIAL_HEADBUMP)
|
||||
fprintf(f, "triggerspecial_headbump = true;\n");
|
||||
if (wsectors[i].flags & MSF_TRIGGERLINE_PLANE)
|
||||
fprintf(f, "triggerline_plane = true;\n");
|
||||
if (wsectors[i].flags & MSF_TRIGGERLINE_MOBJ)
|
||||
fprintf(f, "triggerline_mobj = true;\n");
|
||||
if (wsectors[i].flags & MSF_INVERTPRECIP)
|
||||
fprintf(f, "invertprecip = true;\n");
|
||||
if (wsectors[i].flags & MSF_GRAVITYFLIP)
|
||||
|
|
@ -2443,10 +2445,6 @@ static void P_WriteTextmap(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (wsectors[i].triggertag != 0)
|
||||
fprintf(f, "triggertag = %d;\n", wsectors[i].triggertag);
|
||||
if (wsectors[i].triggerer != 0)
|
||||
fprintf(f, "triggerer = %d;\n", wsectors[i].triggerer);
|
||||
if (wsectors[i].action != 0)
|
||||
fprintf(f, "action = %d;\n", wsectors[i].action);
|
||||
for (j = 0; j < NUMSECTORARGS; j++)
|
||||
|
|
@ -2597,16 +2595,16 @@ static void P_LoadTextmap(void)
|
|||
}
|
||||
|
||||
if (textmap_planefloor.defined == (PD_A|PD_B|PD_C|PD_D))
|
||||
{
|
||||
{
|
||||
sc->f_slope = MakeViaEquationConstants(textmap_planefloor.a, textmap_planefloor.b, textmap_planefloor.c, textmap_planefloor.d);
|
||||
sc->hasslope = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (textmap_planeceiling.defined == (PD_A|PD_B|PD_C|PD_D))
|
||||
{
|
||||
{
|
||||
sc->c_slope = MakeViaEquationConstants(textmap_planeceiling.a, textmap_planeceiling.b, textmap_planeceiling.c, textmap_planeceiling.d);
|
||||
sc->hasslope = true;
|
||||
}
|
||||
}
|
||||
|
||||
TextmapFixFlatOffsets(sc);
|
||||
}
|
||||
|
|
|
|||
45
src/p_spec.c
45
src/p_spec.c
|
|
@ -1516,6 +1516,9 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
|||
{
|
||||
INT16 specialtype = triggerline->special;
|
||||
|
||||
if (udmf)
|
||||
return false;
|
||||
|
||||
////////////////////////
|
||||
// Trigger conditions //
|
||||
////////////////////////
|
||||
|
|
@ -4084,23 +4087,6 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
}
|
||||
break;
|
||||
|
||||
case 465: // Set linedef executor delay
|
||||
{
|
||||
INT32 linenum;
|
||||
|
||||
if (backwardsCompat)
|
||||
break;
|
||||
|
||||
TAG_ITER_LINES(args[0], linenum)
|
||||
{
|
||||
if (args[2])
|
||||
lines[linenum].executordelay += args[1];
|
||||
else
|
||||
lines[linenum].executordelay = args[1];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 466: // Set level failure state
|
||||
{
|
||||
if (args[0])
|
||||
|
|
@ -4831,6 +4817,9 @@ sector_t *P_FindPlayerTrigger(player_t *player, line_t *sourceline)
|
|||
msecnode_t *node;
|
||||
sector_t *caller;
|
||||
|
||||
if (udmf)
|
||||
return NULL;
|
||||
|
||||
if (!player->mo)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -4901,6 +4890,10 @@ static boolean P_DoAllPlayersTrigger(mtag_t triggertag)
|
|||
{
|
||||
INT32 i;
|
||||
line_t dummyline;
|
||||
|
||||
if (udmf)
|
||||
return false;
|
||||
|
||||
dummyline.tags.count = 1;
|
||||
dummyline.tags.tags = &triggertag;
|
||||
|
||||
|
|
@ -5059,7 +5052,7 @@ static boolean P_SectorHasSpecial(sector_t *sec)
|
|||
if (sec->damagetype != SD_NONE)
|
||||
return true;
|
||||
|
||||
if (sec->triggertag)
|
||||
if (!udmf && sec->triggertag)
|
||||
return true;
|
||||
|
||||
if (sec->special)
|
||||
|
|
@ -5128,6 +5121,9 @@ static void P_EvaluateDamageType(player_t *player, sector_t *sector, boolean isT
|
|||
|
||||
static void P_EvaluateLinedefExecutorTrigger(player_t *player, sector_t *sector, boolean isTouching)
|
||||
{
|
||||
if (udmf)
|
||||
return;
|
||||
|
||||
if (!sector->triggertag)
|
||||
return;
|
||||
|
||||
|
|
@ -5393,6 +5389,9 @@ void P_CheckMobjTrigger(mobj_t *mobj, boolean pushable)
|
|||
{
|
||||
sector_t *originalsector;
|
||||
|
||||
if (udmf)
|
||||
return;
|
||||
|
||||
if (!mobj->subsector)
|
||||
return;
|
||||
|
||||
|
|
@ -7294,11 +7293,15 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
case 331: // Player skin
|
||||
case 334: // Object dye
|
||||
case 337: // Emerald check
|
||||
if (udmf)
|
||||
break;
|
||||
if (lines[i].args[0] > TMT_EACHTIMEMASK)
|
||||
P_AddEachTimeThinker(&lines[i], lines[i].args[0] == TMT_EACHTIMEENTERANDEXIT);
|
||||
break;
|
||||
|
||||
case 308: // Race-only linedef executor. Triggers once.
|
||||
if (udmf)
|
||||
break;
|
||||
if (!P_CheckGametypeRules(lines[i].args[2], (UINT32)lines[i].args[1]))
|
||||
{
|
||||
lines[i].special = 0;
|
||||
|
|
@ -7310,6 +7313,8 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
|
||||
// Linedef executor triggers for CTF teams.
|
||||
case 309:
|
||||
if (udmf)
|
||||
break;
|
||||
if (!(gametyperules & GTR_TEAMS))
|
||||
{
|
||||
lines[i].special = 0;
|
||||
|
|
@ -7321,11 +7326,15 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
|
||||
// No More Enemies Linedef Exec
|
||||
case 313:
|
||||
if (udmf)
|
||||
break;
|
||||
P_AddNoEnemiesThinker(&lines[i]);
|
||||
break;
|
||||
|
||||
// Trigger on X calls
|
||||
case 321:
|
||||
if (udmf)
|
||||
break;
|
||||
lines[i].callcount = (lines[i].args[2] && lines[i].args[3] > 0) ? lines[i].args[3] : lines[i].args[1]; // optional "starting" count
|
||||
if (lines[i].args[0] > TMXT_EACHTIMEMASK) // Each time
|
||||
P_AddEachTimeThinker(&lines[i], lines[i].args[0] == TMXT_EACHTIMEENTERANDEXIT);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue