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
11
src/p_mobj.c
11
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)
|
if ((mo->z == polysec->ceilingheight || mo->z + mo->height == polysec->floorheight) && po->thinker)
|
||||||
stopmovecut = true;
|
stopmovecut = true;
|
||||||
|
|
||||||
|
if (udmf)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!(po->flags & POF_LDEXEC))
|
if (!(po->flags & POF_LDEXEC))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
@ -9810,11 +9813,16 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
P_SetTarget(&tm.floorthing, NULL);
|
P_SetTarget(&tm.floorthing, NULL);
|
||||||
P_SetTarget(&tm.hitthing, NULL);
|
P_SetTarget(&tm.hitthing, NULL);
|
||||||
|
|
||||||
|
if (udmf)
|
||||||
|
{
|
||||||
// Check for sector special actions
|
// Check for sector special actions
|
||||||
P_CheckMobjTouchingSectorActions(mobj);
|
P_CheckMobjTouchingSectorActions(mobj);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// Sector flag MSF_TRIGGERLINE_MOBJ allows ANY mobj to trigger a linedef exec
|
// Sector flag MSF_TRIGGERLINE_MOBJ allows ANY mobj to trigger a linedef exec
|
||||||
P_CheckMobjTrigger(mobj, false);
|
P_CheckMobjTrigger(mobj, false);
|
||||||
|
}
|
||||||
|
|
||||||
if (mobj->scale != mobj->destscale)
|
if (mobj->scale != mobj->destscale)
|
||||||
P_MobjScaleThink(mobj); // Slowly scale up/down to reach your destscale.
|
P_MobjScaleThink(mobj); // Slowly scale up/down to reach your destscale.
|
||||||
|
|
@ -10102,6 +10110,7 @@ void P_PushableThinker(mobj_t *mobj)
|
||||||
I_Assert(mobj != NULL);
|
I_Assert(mobj != NULL);
|
||||||
I_Assert(!P_MobjWasRemoved(mobj));
|
I_Assert(!P_MobjWasRemoved(mobj));
|
||||||
|
|
||||||
|
if (!udmf)
|
||||||
P_CheckMobjTrigger(mobj, true);
|
P_CheckMobjTrigger(mobj, true);
|
||||||
|
|
||||||
// it has to be pushable RIGHT NOW for this part to happen
|
// it has to be pushable RIGHT NOW for this part to happen
|
||||||
|
|
|
||||||
|
|
@ -242,6 +242,7 @@ static void Polyobj_GetInfo(polyobj_t *po, line_t *line)
|
||||||
if (line->args[3] & TMPF_CRUSH)
|
if (line->args[3] & TMPF_CRUSH)
|
||||||
po->damage = 3;
|
po->damage = 3;
|
||||||
|
|
||||||
|
if (!udmf)
|
||||||
po->triggertag = line->args[4];
|
po->triggertag = line->args[4];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1482,10 +1482,6 @@ static void ParseTextmapSectorParameter(UINT32 i, const char *param, const char
|
||||||
sectors[i].flags |= MSF_TRIGGERSPECIAL_TOUCH;
|
sectors[i].flags |= MSF_TRIGGERSPECIAL_TOUCH;
|
||||||
else if (fastcmp(param, "triggerspecial_headbump") && fastcmp("true", val))
|
else if (fastcmp(param, "triggerspecial_headbump") && fastcmp("true", val))
|
||||||
sectors[i].flags |= MSF_TRIGGERSPECIAL_HEADBUMP;
|
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))
|
else if (fastcmp(param, "invertprecip") && fastcmp("true", val))
|
||||||
sectors[i].flags |= MSF_INVERTPRECIP;
|
sectors[i].flags |= MSF_INVERTPRECIP;
|
||||||
else if (fastcmp(param, "gravityflip") && fastcmp("true", val))
|
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"))
|
if (fastcmp(val, "Instakill"))
|
||||||
sectors[i].damagetype = SD_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"))
|
else if (fastcmp(param, "action"))
|
||||||
sectors[i].action = atol(val);
|
sectors[i].action = atol(val);
|
||||||
else if (fastncmp(param, "stringarg", 9) && strlen(param) > 9)
|
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"))
|
if (fastcmp(val, "fog"))
|
||||||
lines[i].blendmode = AST_FOG;
|
lines[i].blendmode = AST_FOG;
|
||||||
}
|
}
|
||||||
else if (fastcmp(param, "executordelay"))
|
|
||||||
lines[i].executordelay = atol(val);
|
|
||||||
|
|
||||||
// Flags
|
// Flags
|
||||||
else if (fastcmp(param, "blocking") && fastcmp("true", val))
|
else if (fastcmp(param, "blocking") && fastcmp("true", val))
|
||||||
|
|
@ -2073,8 +2063,16 @@ static void P_WriteTextmap(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wlines[i].special >= 300 && wlines[i].special < 400 && wlines[i].flags & ML_WRAPMIDTEX)
|
if (wlines[i].special >= 300 && wlines[i].special < 400)
|
||||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef executor trigger linedef %s has disregard order flag, which is not supported in UDMF.\n"), sizeu1(i));
|
{
|
||||||
|
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++)
|
for (i = 0; i < numsectors; i++)
|
||||||
|
|
@ -2090,7 +2088,7 @@ static void P_WriteTextmap(void)
|
||||||
{
|
{
|
||||||
case 9:
|
case 9:
|
||||||
case 10:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
@ -2099,17 +2097,30 @@ static void P_WriteTextmap(void)
|
||||||
switch (GETSECSPECIAL(wsectors[i].special, 2))
|
switch (GETSECSPECIAL(wsectors[i].special, 2))
|
||||||
{
|
{
|
||||||
case 6:
|
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;
|
break;
|
||||||
case 7:
|
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;
|
break;
|
||||||
case 9:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
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");
|
fprintf(f, "namespace = \"srb2\";\n");
|
||||||
|
|
@ -2228,11 +2239,6 @@ static void P_WriteTextmap(void)
|
||||||
break;
|
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)
|
if (wlines[i].flags & ML_IMPASSABLE)
|
||||||
fprintf(f, "blocking = true;\n");
|
fprintf(f, "blocking = true;\n");
|
||||||
if (wlines[i].flags & ML_BLOCKPLAYERS)
|
if (wlines[i].flags & ML_BLOCKPLAYERS)
|
||||||
|
|
@ -2383,10 +2389,6 @@ static void P_WriteTextmap(void)
|
||||||
fprintf(f, "triggerspecial_touch = true;\n");
|
fprintf(f, "triggerspecial_touch = true;\n");
|
||||||
if (wsectors[i].flags & MSF_TRIGGERSPECIAL_HEADBUMP)
|
if (wsectors[i].flags & MSF_TRIGGERSPECIAL_HEADBUMP)
|
||||||
fprintf(f, "triggerspecial_headbump = true;\n");
|
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)
|
if (wsectors[i].flags & MSF_INVERTPRECIP)
|
||||||
fprintf(f, "invertprecip = true;\n");
|
fprintf(f, "invertprecip = true;\n");
|
||||||
if (wsectors[i].flags & MSF_GRAVITYFLIP)
|
if (wsectors[i].flags & MSF_GRAVITYFLIP)
|
||||||
|
|
@ -2443,10 +2445,6 @@ static void P_WriteTextmap(void)
|
||||||
break;
|
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)
|
if (wsectors[i].action != 0)
|
||||||
fprintf(f, "action = %d;\n", wsectors[i].action);
|
fprintf(f, "action = %d;\n", wsectors[i].action);
|
||||||
for (j = 0; j < NUMSECTORARGS; j++)
|
for (j = 0; j < NUMSECTORARGS; j++)
|
||||||
|
|
|
||||||
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;
|
INT16 specialtype = triggerline->special;
|
||||||
|
|
||||||
|
if (udmf)
|
||||||
|
return false;
|
||||||
|
|
||||||
////////////////////////
|
////////////////////////
|
||||||
// Trigger conditions //
|
// Trigger conditions //
|
||||||
////////////////////////
|
////////////////////////
|
||||||
|
|
@ -4084,23 +4087,6 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
||||||
}
|
}
|
||||||
break;
|
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
|
case 466: // Set level failure state
|
||||||
{
|
{
|
||||||
if (args[0])
|
if (args[0])
|
||||||
|
|
@ -4831,6 +4817,9 @@ sector_t *P_FindPlayerTrigger(player_t *player, line_t *sourceline)
|
||||||
msecnode_t *node;
|
msecnode_t *node;
|
||||||
sector_t *caller;
|
sector_t *caller;
|
||||||
|
|
||||||
|
if (udmf)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!player->mo)
|
if (!player->mo)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
@ -4901,6 +4890,10 @@ static boolean P_DoAllPlayersTrigger(mtag_t triggertag)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
line_t dummyline;
|
line_t dummyline;
|
||||||
|
|
||||||
|
if (udmf)
|
||||||
|
return false;
|
||||||
|
|
||||||
dummyline.tags.count = 1;
|
dummyline.tags.count = 1;
|
||||||
dummyline.tags.tags = &triggertag;
|
dummyline.tags.tags = &triggertag;
|
||||||
|
|
||||||
|
|
@ -5059,7 +5052,7 @@ static boolean P_SectorHasSpecial(sector_t *sec)
|
||||||
if (sec->damagetype != SD_NONE)
|
if (sec->damagetype != SD_NONE)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (sec->triggertag)
|
if (!udmf && sec->triggertag)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (sec->special)
|
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)
|
static void P_EvaluateLinedefExecutorTrigger(player_t *player, sector_t *sector, boolean isTouching)
|
||||||
{
|
{
|
||||||
|
if (udmf)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!sector->triggertag)
|
if (!sector->triggertag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -5393,6 +5389,9 @@ void P_CheckMobjTrigger(mobj_t *mobj, boolean pushable)
|
||||||
{
|
{
|
||||||
sector_t *originalsector;
|
sector_t *originalsector;
|
||||||
|
|
||||||
|
if (udmf)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!mobj->subsector)
|
if (!mobj->subsector)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -7294,11 +7293,15 @@ void P_SpawnSpecials(boolean fromnetsave)
|
||||||
case 331: // Player skin
|
case 331: // Player skin
|
||||||
case 334: // Object dye
|
case 334: // Object dye
|
||||||
case 337: // Emerald check
|
case 337: // Emerald check
|
||||||
|
if (udmf)
|
||||||
|
break;
|
||||||
if (lines[i].args[0] > TMT_EACHTIMEMASK)
|
if (lines[i].args[0] > TMT_EACHTIMEMASK)
|
||||||
P_AddEachTimeThinker(&lines[i], lines[i].args[0] == TMT_EACHTIMEENTERANDEXIT);
|
P_AddEachTimeThinker(&lines[i], lines[i].args[0] == TMT_EACHTIMEENTERANDEXIT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 308: // Race-only linedef executor. Triggers once.
|
case 308: // Race-only linedef executor. Triggers once.
|
||||||
|
if (udmf)
|
||||||
|
break;
|
||||||
if (!P_CheckGametypeRules(lines[i].args[2], (UINT32)lines[i].args[1]))
|
if (!P_CheckGametypeRules(lines[i].args[2], (UINT32)lines[i].args[1]))
|
||||||
{
|
{
|
||||||
lines[i].special = 0;
|
lines[i].special = 0;
|
||||||
|
|
@ -7310,6 +7313,8 @@ void P_SpawnSpecials(boolean fromnetsave)
|
||||||
|
|
||||||
// Linedef executor triggers for CTF teams.
|
// Linedef executor triggers for CTF teams.
|
||||||
case 309:
|
case 309:
|
||||||
|
if (udmf)
|
||||||
|
break;
|
||||||
if (!(gametyperules & GTR_TEAMS))
|
if (!(gametyperules & GTR_TEAMS))
|
||||||
{
|
{
|
||||||
lines[i].special = 0;
|
lines[i].special = 0;
|
||||||
|
|
@ -7321,11 +7326,15 @@ void P_SpawnSpecials(boolean fromnetsave)
|
||||||
|
|
||||||
// No More Enemies Linedef Exec
|
// No More Enemies Linedef Exec
|
||||||
case 313:
|
case 313:
|
||||||
|
if (udmf)
|
||||||
|
break;
|
||||||
P_AddNoEnemiesThinker(&lines[i]);
|
P_AddNoEnemiesThinker(&lines[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Trigger on X calls
|
// Trigger on X calls
|
||||||
case 321:
|
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
|
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
|
if (lines[i].args[0] > TMXT_EACHTIMEMASK) // Each time
|
||||||
P_AddEachTimeThinker(&lines[i], lines[i].args[0] == TMXT_EACHTIMEENTERANDEXIT);
|
P_AddEachTimeThinker(&lines[i], lines[i].args[0] == TMXT_EACHTIMEENTERANDEXIT);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue