mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Adapt a whole bunch of linedef executors to UDMF
This commit is contained in:
parent
6010faf10c
commit
877ec96eec
4 changed files with 221 additions and 41 deletions
|
@ -952,6 +952,11 @@ doom
|
||||||
title = "Stop Timer/Exit Stage in Record Attack";
|
title = "Stop Timer/Exit Stage in Record Attack";
|
||||||
prefix = "(462)";
|
prefix = "(462)";
|
||||||
}
|
}
|
||||||
|
466
|
||||||
|
{
|
||||||
|
title = "Set Level Failure State";
|
||||||
|
prefix = "(466)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
linedefexecmisc
|
linedefexecmisc
|
||||||
|
@ -2950,11 +2955,41 @@ udmf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
460
|
||||||
|
{
|
||||||
|
title = "Award Rings";
|
||||||
|
prefix = "(460)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "Rings";
|
||||||
|
}
|
||||||
|
arg1
|
||||||
|
{
|
||||||
|
title = "Periodicity";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
462
|
462
|
||||||
{
|
{
|
||||||
title = "Stop Timer/Exit Stage in Record Attack";
|
title = "Stop Timer/Exit Stage in Record Attack";
|
||||||
prefix = "(462)";
|
prefix = "(462)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
466
|
||||||
|
{
|
||||||
|
title = "Set Level Failure State";
|
||||||
|
prefix = "(466)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "State";
|
||||||
|
type = 11;
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
0 = "Failure";
|
||||||
|
1 = "Success";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
linedefexecmisc
|
linedefexecmisc
|
||||||
|
@ -3021,6 +3056,16 @@ udmf
|
||||||
prefix = "(440)";
|
prefix = "(440)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
441
|
||||||
|
{
|
||||||
|
title = "Condition Set Trigger";
|
||||||
|
prefix = "(441)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "Trigger number";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
443
|
443
|
||||||
{
|
{
|
||||||
title = "Call Lua Function";
|
title = "Call Lua Function";
|
||||||
|
@ -3032,6 +3077,20 @@ udmf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
444
|
||||||
|
{
|
||||||
|
title = "Earthquake";
|
||||||
|
prefix = "(444)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "Duration";
|
||||||
|
}
|
||||||
|
arg1
|
||||||
|
{
|
||||||
|
title = "Intensity";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
447
|
447
|
||||||
{
|
{
|
||||||
title = "Change Tagged Sector's Colormap";
|
title = "Change Tagged Sector's Colormap";
|
||||||
|
@ -3068,6 +3127,84 @@ udmf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
448
|
||||||
|
{
|
||||||
|
title = "Change Skybox";
|
||||||
|
prefix = "(448)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "Viewpoint ID";
|
||||||
|
}
|
||||||
|
arg1
|
||||||
|
{
|
||||||
|
title = "Centerpoint ID";
|
||||||
|
}
|
||||||
|
arg2
|
||||||
|
{
|
||||||
|
title = "Change?";
|
||||||
|
type = 11;
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
0 = "Viewpoint";
|
||||||
|
1 = "Centerpoint";
|
||||||
|
2 = "Both";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arg3
|
||||||
|
{
|
||||||
|
title = "For all players?";
|
||||||
|
type = 11;
|
||||||
|
enum = "noyes";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
449
|
||||||
|
{
|
||||||
|
title = "Enable Bosses with Parameter";
|
||||||
|
prefix = "(449)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "Boss ID";
|
||||||
|
}
|
||||||
|
arg1
|
||||||
|
{
|
||||||
|
title = Effect";
|
||||||
|
type = 11;
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
0 = "Enable";
|
||||||
|
1 = "Disable";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
450
|
||||||
|
{
|
||||||
|
title = "Execute Linedef Executor (specific tag)";
|
||||||
|
prefix = "(450)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "Trigger linedef tag";
|
||||||
|
type = 15;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
451
|
||||||
|
{
|
||||||
|
title = "Execute Linedef Executor (random tag in range)";
|
||||||
|
prefix = "(451)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "Start of tag range";
|
||||||
|
type = 15;
|
||||||
|
}
|
||||||
|
arg1
|
||||||
|
{
|
||||||
|
title = "End of tag range";
|
||||||
|
type = 15;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
455
|
455
|
||||||
{
|
{
|
||||||
title = "Fade Tagged Sector's Colormap";
|
title = "Fade Tagged Sector's Colormap";
|
||||||
|
|
|
@ -3824,6 +3824,9 @@ static void P_ConvertBinaryMap(void)
|
||||||
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
lines[i].args[1] = !!(lines[i].flags & ML_NOCLIMB);
|
lines[i].args[1] = !!(lines[i].flags & ML_NOCLIMB);
|
||||||
break;
|
break;
|
||||||
|
case 441: //Condition set trigger
|
||||||
|
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
|
break;
|
||||||
case 443: //Call Lua function
|
case 443: //Call Lua function
|
||||||
if (lines[i].text)
|
if (lines[i].text)
|
||||||
{
|
{
|
||||||
|
@ -3833,6 +3836,11 @@ static void P_ConvertBinaryMap(void)
|
||||||
else
|
else
|
||||||
CONS_Alert(CONS_WARNING, "Linedef %s is missing the hook name of the Lua function to call! (This should be given in the front texture fields)\n", sizeu1(i));
|
CONS_Alert(CONS_WARNING, "Linedef %s is missing the hook name of the Lua function to call! (This should be given in the front texture fields)\n", sizeu1(i));
|
||||||
break;
|
break;
|
||||||
|
case 444: //Earthquake
|
||||||
|
lines[i].args[0] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS;
|
||||||
|
lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
|
lines[i].args[2] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||||
|
break;
|
||||||
case 447: //Change colormap
|
case 447: //Change colormap
|
||||||
lines[i].args[0] = Tag_FGet(&lines[i].tags);
|
lines[i].args[0] = Tag_FGet(&lines[i].tags);
|
||||||
if (lines[i].flags & ML_EFFECT3)
|
if (lines[i].flags & ML_EFFECT3)
|
||||||
|
@ -3844,6 +3852,36 @@ static void P_ConvertBinaryMap(void)
|
||||||
if (lines[i].flags & ML_EFFECT2)
|
if (lines[i].flags & ML_EFFECT2)
|
||||||
lines[i].args[2] |= TMCF_SUBLIGHTB|TMCF_SUBFADEB;
|
lines[i].args[2] |= TMCF_SUBLIGHTB|TMCF_SUBFADEB;
|
||||||
break;
|
break;
|
||||||
|
case 448: //Change skybox
|
||||||
|
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
|
lines[i].args[1] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||||
|
if ((lines[i].flags & (ML_EFFECT4|ML_BLOCKMONSTERS)) == ML_EFFECT4) // Solid Midtexture is on but Block Enemies is off?
|
||||||
|
{
|
||||||
|
CONS_Alert(CONS_WARNING,
|
||||||
|
M_GetText("Skybox switch linedef (tag %d) doesn't have anything to do.\nConsider changing the linedef's flag configuration or removing it entirely.\n"),
|
||||||
|
tag);
|
||||||
|
lines[i].special = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if ((lines[i].flags & (ML_EFFECT4|ML_BLOCKMONSTERS)) == (ML_EFFECT4|ML_BLOCKMONSTERS))
|
||||||
|
lines[i].args[2] = TMS_CENTERPOINT;
|
||||||
|
else if (lines[i].flags & ML_BLOCKMONSTERS)
|
||||||
|
lines[i].args[2] = TMS_BOTH;
|
||||||
|
else
|
||||||
|
lines[i].args[2] = TMS_VIEWPOINT;
|
||||||
|
lines[i].args[3] = !!(lines[i].flags & ML_NOCLIMB);
|
||||||
|
break;
|
||||||
|
case 449: //Enable bosses with parameters
|
||||||
|
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
|
lines[i].args[1] = !!(lines[i].flags & ML_NOCLIMB);
|
||||||
|
break;
|
||||||
|
case 450: //Execute linedef executor (specific tag)
|
||||||
|
lines[i].args[0] = tag;
|
||||||
|
break;
|
||||||
|
case 451: //Execute linedef executor (random tag in range)
|
||||||
|
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
|
lines[i].args[1] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||||
|
break;
|
||||||
case 455: //Fade colormap
|
case 455: //Fade colormap
|
||||||
{
|
{
|
||||||
INT32 speed = (INT32)((((lines[i].flags & ML_DONTPEGBOTTOM) || !sides[lines[i].sidenum[0]].rowoffset) && lines[i].sidenum[1] != 0xFFFF) ?
|
INT32 speed = (INT32)((((lines[i].flags & ML_DONTPEGBOTTOM) || !sides[lines[i].sidenum[0]].rowoffset) && lines[i].sidenum[1] != 0xFFFF) ?
|
||||||
|
@ -3872,6 +3910,13 @@ static void P_ConvertBinaryMap(void)
|
||||||
case 456: //Stop fading colormap
|
case 456: //Stop fading colormap
|
||||||
lines[i].args[0] = Tag_FGet(&lines[i].tags);
|
lines[i].args[0] = Tag_FGet(&lines[i].tags);
|
||||||
break;
|
break;
|
||||||
|
case 460: //Award rings
|
||||||
|
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
|
lines[i].args[1] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||||
|
break;
|
||||||
|
case 466: //Set level failure state
|
||||||
|
lines[i].args[0] = !!(lines[i].flags & ML_NOCLIMB);
|
||||||
|
break;
|
||||||
case 467: //Set light level
|
case 467: //Set light level
|
||||||
lines[i].args[0] = tag;
|
lines[i].args[0] = tag;
|
||||||
lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
|
|
73
src/p_spec.c
73
src/p_spec.c
|
@ -2812,7 +2812,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
case 441: // Trigger unlockable
|
case 441: // Trigger unlockable
|
||||||
if ((!modifiedgame || savemoddata) && !(netgame || multiplayer))
|
if ((!modifiedgame || savemoddata) && !(netgame || multiplayer))
|
||||||
{
|
{
|
||||||
INT32 trigid = (INT32)(sides[line->sidenum[0]].textureoffset>>FRACBITS);
|
INT32 trigid = line->args[0];
|
||||||
|
|
||||||
if (trigid < 0 || trigid > 31) // limited by 32 bit variable
|
if (trigid < 0 || trigid > 31) // limited by 32 bit variable
|
||||||
CONS_Debug(DBG_GAMELOGIC, "Unlockable trigger (sidedef %hu): bad trigger ID %d\n", line->sidenum[0], trigid);
|
CONS_Debug(DBG_GAMELOGIC, "Unlockable trigger (sidedef %hu): bad trigger ID %d\n", line->sidenum[0], trigid);
|
||||||
|
@ -2880,9 +2880,9 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
|
|
||||||
case 444: // Earthquake camera
|
case 444: // Earthquake camera
|
||||||
{
|
{
|
||||||
quake.intensity = sides[line->sidenum[0]].textureoffset;
|
quake.intensity = line->args[1] << FRACBITS;
|
||||||
quake.radius = sides[line->sidenum[0]].rowoffset;
|
quake.radius = line->args[2] << FRACBITS;
|
||||||
quake.time = P_AproxDistance(line->dx, line->dy)>>FRACBITS;
|
quake.time = line->args[0];
|
||||||
|
|
||||||
quake.epicenter = NULL; /// \todo
|
quake.epicenter = NULL; /// \todo
|
||||||
|
|
||||||
|
@ -3060,57 +3060,48 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 448: // Change skybox viewpoint/centerpoint
|
case 448: // Change skybox viewpoint/centerpoint
|
||||||
if ((mo && mo->player && P_IsLocalPlayer(mo->player)) || (line->flags & ML_NOCLIMB))
|
if ((mo && mo->player && P_IsLocalPlayer(mo->player)) || line->args[3])
|
||||||
{
|
{
|
||||||
INT32 viewid = sides[line->sidenum[0]].textureoffset>>FRACBITS;
|
INT32 viewid = line->args[0];
|
||||||
INT32 centerid = sides[line->sidenum[0]].rowoffset>>FRACBITS;
|
INT32 centerid = line->args[1];
|
||||||
|
|
||||||
if ((line->flags & (ML_EFFECT4|ML_BLOCKMONSTERS)) == ML_EFFECT4) // Solid Midtexture is on but Block Enemies is off?
|
// set viewpoint mobj
|
||||||
|
if (line->args[2] != TMS_CENTERPOINT)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_WARNING,
|
if (viewid >= 0 && viewid < 16)
|
||||||
M_GetText("Skybox switch linedef (tag %d) doesn't have anything to do.\nConsider changing the linedef's flag configuration or removing it entirely.\n"),
|
skyboxmo[0] = skyboxviewpnts[viewid];
|
||||||
tag);
|
else
|
||||||
|
skyboxmo[0] = NULL;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// set viewpoint mobj
|
|
||||||
if (!(line->flags & ML_EFFECT4)) // Solid Midtexture turns off viewpoint setting
|
|
||||||
{
|
|
||||||
if (viewid >= 0 && viewid < 16)
|
|
||||||
skyboxmo[0] = skyboxviewpnts[viewid];
|
|
||||||
else
|
|
||||||
skyboxmo[0] = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// set centerpoint mobj
|
// set centerpoint mobj
|
||||||
if (line->flags & ML_BLOCKMONSTERS) // Block Enemies turns ON centerpoint setting
|
if (line->args[2] != TMS_VIEWPOINT)
|
||||||
{
|
{
|
||||||
if (centerid >= 0 && centerid < 16)
|
if (centerid >= 0 && centerid < 16)
|
||||||
skyboxmo[1] = skyboxcenterpnts[centerid];
|
skyboxmo[1] = skyboxcenterpnts[centerid];
|
||||||
else
|
else
|
||||||
skyboxmo[1] = NULL;
|
skyboxmo[1] = NULL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CONS_Debug(DBG_GAMELOGIC, "Line type 448 Executor: viewid = %d, centerid = %d, viewpoint? = %s, centerpoint? = %s\n",
|
CONS_Debug(DBG_GAMELOGIC, "Line type 448 Executor: viewid = %d, centerid = %d, viewpoint? = %s, centerpoint? = %s\n",
|
||||||
viewid,
|
viewid,
|
||||||
centerid,
|
centerid,
|
||||||
((line->flags & ML_EFFECT4) ? "no" : "yes"),
|
((line->args[2] == TMS_CENTERPOINT) ? "no" : "yes"),
|
||||||
((line->flags & ML_BLOCKMONSTERS) ? "yes" : "no"));
|
((line->args[2] == TMS_VIEWPOINT) ? "no" : "yes"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 449: // Enable bosses with parameter
|
case 449: // Enable bosses with parameter
|
||||||
{
|
{
|
||||||
INT32 bossid = sides[line->sidenum[0]].textureoffset>>FRACBITS;
|
INT32 bossid = line->args[0];
|
||||||
if (bossid & ~15) // if any bits other than first 16 are set
|
if (bossid & ~15) // if any bits other than first 16 are set
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_WARNING,
|
CONS_Alert(CONS_WARNING,
|
||||||
M_GetText("Boss enable linedef (tag %d) has an invalid texture x offset.\nConsider changing it or removing it entirely.\n"),
|
M_GetText("Boss enable linedef has an invalid boss ID (%d).\nConsider changing it or removing it entirely.\n"),
|
||||||
tag);
|
bossid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (line->flags & ML_NOCLIMB)
|
if (line->args[1])
|
||||||
{
|
{
|
||||||
bossdisabled |= (1<<bossid);
|
bossdisabled |= (1<<bossid);
|
||||||
CONS_Debug(DBG_GAMELOGIC, "Line type 449 Executor: bossid disabled = %d", bossid);
|
CONS_Debug(DBG_GAMELOGIC, "Line type 449 Executor: bossid disabled = %d", bossid);
|
||||||
|
@ -3124,13 +3115,13 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
}
|
}
|
||||||
|
|
||||||
case 450: // Execute Linedef Executor - for recursion
|
case 450: // Execute Linedef Executor - for recursion
|
||||||
P_LinedefExecute(tag, mo, NULL);
|
P_LinedefExecute(line->args[0], mo, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 451: // Execute Random Linedef Executor
|
case 451: // Execute Random Linedef Executor
|
||||||
{
|
{
|
||||||
INT32 rvalue1 = sides[line->sidenum[0]].textureoffset>>FRACBITS;
|
INT32 rvalue1 = line->args[0];
|
||||||
INT32 rvalue2 = sides[line->sidenum[0]].rowoffset>>FRACBITS;
|
INT32 rvalue2 = line->args[1];
|
||||||
INT32 result;
|
INT32 result;
|
||||||
|
|
||||||
if (rvalue1 <= rvalue2)
|
if (rvalue1 <= rvalue2)
|
||||||
|
@ -3500,8 +3491,8 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
|
|
||||||
case 460: // Award rings
|
case 460: // Award rings
|
||||||
{
|
{
|
||||||
INT16 rings = (sides[line->sidenum[0]].textureoffset>>FRACBITS);
|
INT16 rings = line->args[0];
|
||||||
INT32 delay = (sides[line->sidenum[0]].rowoffset>>FRACBITS);
|
INT32 delay = line->args[1];
|
||||||
if (mo && mo->player)
|
if (mo && mo->player)
|
||||||
{
|
{
|
||||||
if (delay <= 0 || !(leveltime % delay))
|
if (delay <= 0 || !(leveltime % delay))
|
||||||
|
@ -3641,7 +3632,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
|
|
||||||
case 466: // Set level failure state
|
case 466: // Set level failure state
|
||||||
{
|
{
|
||||||
if (line->flags & ML_NOCLIMB)
|
if (line->args[1])
|
||||||
{
|
{
|
||||||
stagefailed = false;
|
stagefailed = false;
|
||||||
CONS_Debug(DBG_GAMELOGIC, "Stage can be completed successfully!\n");
|
CONS_Debug(DBG_GAMELOGIC, "Stage can be completed successfully!\n");
|
||||||
|
|
|
@ -139,6 +139,13 @@ typedef enum
|
||||||
TMB_SYNC = 1<<1,
|
TMB_SYNC = 1<<1,
|
||||||
} textmapblinkinglightflags_t;
|
} textmapblinkinglightflags_t;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
TMS_VIEWPOINT = 0,
|
||||||
|
TMS_CENTERPOINT = 1,
|
||||||
|
TMS_BOTH = 2,
|
||||||
|
} textmapskybox_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
TMSD_FRONT = 0,
|
TMSD_FRONT = 0,
|
||||||
|
|
Loading…
Reference in a new issue