mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-29 07:32:02 +00:00
Adapt linedef types 334-336 to UDMF
This commit is contained in:
parent
adaf599e87
commit
c43d5c7183
3 changed files with 66 additions and 25 deletions
|
@ -739,6 +739,21 @@ doom
|
||||||
title = "Player Skin - Once";
|
title = "Player Skin - Once";
|
||||||
prefix = "(333)";
|
prefix = "(333)";
|
||||||
}
|
}
|
||||||
|
334
|
||||||
|
{
|
||||||
|
title = "Object Dye - Continuous";
|
||||||
|
prefix = "(334)";
|
||||||
|
}
|
||||||
|
335
|
||||||
|
{
|
||||||
|
title = "Object Dye - Each Time";
|
||||||
|
prefix = "(335)";
|
||||||
|
}
|
||||||
|
336
|
||||||
|
{
|
||||||
|
title = "Object Dye - Once";
|
||||||
|
prefix = "(336)";
|
||||||
|
}
|
||||||
399
|
399
|
||||||
{
|
{
|
||||||
title = "Level Load";
|
title = "Level Load";
|
||||||
|
@ -3025,6 +3040,29 @@ udmf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
334
|
||||||
|
{
|
||||||
|
title = "Object Dye";
|
||||||
|
prefix = "(334)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "Trigger type";
|
||||||
|
type = 11;
|
||||||
|
enum = "triggertype";
|
||||||
|
}
|
||||||
|
arg1
|
||||||
|
{
|
||||||
|
title = "Invert choice?";
|
||||||
|
type = 11;
|
||||||
|
enum = "noyes";
|
||||||
|
}
|
||||||
|
stringarg0
|
||||||
|
{
|
||||||
|
title = "Color";
|
||||||
|
type = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
399
|
399
|
||||||
{
|
{
|
||||||
title = "Level Load";
|
title = "Level Load";
|
||||||
|
|
|
@ -1302,9 +1302,6 @@ static void P_LoadSidedefs(UINT8 *data)
|
||||||
case 9: // Mace parameters
|
case 9: // Mace parameters
|
||||||
case 14: // Bustable block parameters
|
case 14: // Bustable block parameters
|
||||||
case 15: // Fan particle spawner parameters
|
case 15: // Fan particle spawner parameters
|
||||||
case 334: // Trigger linedef executor: Object dye - Continuous
|
|
||||||
case 335: // Trigger linedef executor: Object dye - Each time
|
|
||||||
case 336: // Trigger linedef executor: Object dye - Once
|
|
||||||
{
|
{
|
||||||
char process[8*3+1];
|
char process[8*3+1];
|
||||||
memset(process,0,8*3+1);
|
memset(process,0,8*3+1);
|
||||||
|
@ -1324,6 +1321,9 @@ static void P_LoadSidedefs(UINT8 *data)
|
||||||
case 331: // Trigger linedef executor: Skin - Continuous
|
case 331: // Trigger linedef executor: Skin - Continuous
|
||||||
case 332: // Trigger linedef executor: Skin - Each time
|
case 332: // Trigger linedef executor: Skin - Each time
|
||||||
case 333: // Trigger linedef executor: Skin - Once
|
case 333: // Trigger linedef executor: Skin - Once
|
||||||
|
case 334: // Trigger linedef executor: Object dye - Continuous
|
||||||
|
case 335: // Trigger linedef executor: Object dye - Each time
|
||||||
|
case 336: // Trigger linedef executor: Object dye - Once
|
||||||
case 425: // Calls P_SetMobjState on calling mobj
|
case 425: // Calls P_SetMobjState on calling mobj
|
||||||
case 434: // Custom Power
|
case 434: // Custom Power
|
||||||
case 442: // Calls P_SetMobjState on mobjs of a given type in the tagged sectors
|
case 442: // Calls P_SetMobjState on mobjs of a given type in the tagged sectors
|
||||||
|
@ -3898,6 +3898,23 @@ static void P_ConvertBinaryMap(void)
|
||||||
}
|
}
|
||||||
lines[i].special = 331;
|
lines[i].special = 331;
|
||||||
break;
|
break;
|
||||||
|
case 334: // Object dye - continuous
|
||||||
|
case 335: // Object dye - each time
|
||||||
|
case 336: // Object dye - once
|
||||||
|
if (lines[i].special == 336)
|
||||||
|
lines[i].args[0] = TMT_ONCE;
|
||||||
|
else if (lines[i].special == 335)
|
||||||
|
lines[i].args[0] = (lines[i].flags & ML_BOUNCY) ? TMT_EACHTIMEENTERANDEXIT : TMT_EACHTIMEENTER;
|
||||||
|
else
|
||||||
|
lines[i].args[0] = TMT_CONTINUOUS;
|
||||||
|
lines[i].args[1] = !!(lines[i].flags & ML_NOCLIMB);
|
||||||
|
if (sides[lines[i].sidenum[0]].text)
|
||||||
|
{
|
||||||
|
lines[i].stringargs[0] = Z_Malloc(strlen(sides[lines[i].sidenum[0]].text) + 1, PU_LEVEL, NULL);
|
||||||
|
M_Memcpy(lines[i].stringargs[0], sides[lines[i].sidenum[0]].text, strlen(sides[lines[i].sidenum[0]].text) + 1);
|
||||||
|
}
|
||||||
|
lines[i].special = 334;
|
||||||
|
break;
|
||||||
case 400: //Set tagged sector's floor height/texture
|
case 400: //Set tagged sector's floor height/texture
|
||||||
case 401: //Set tagged sector's ceiling height/texture
|
case 401: //Set tagged sector's ceiling height/texture
|
||||||
lines[i].args[0] = tag;
|
lines[i].args[0] = tag;
|
||||||
|
|
30
src/p_spec.c
30
src/p_spec.c
|
@ -1814,15 +1814,12 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
||||||
if (!(stricmp(triggerline->stringargs[0], skins[actor->player->skin].name) == 0) ^ !!(triggerline->args[1]))
|
if (!(stricmp(triggerline->stringargs[0], skins[actor->player->skin].name) == 0) ^ !!(triggerline->args[1]))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case 334: // object dye - continuous
|
case 334: // object dye
|
||||||
case 335: // object dye - each time
|
|
||||||
case 336: // object dye - once
|
|
||||||
{
|
{
|
||||||
INT32 triggercolor = (INT32)sides[triggerline->sidenum[0]].toptexture;
|
INT32 triggercolor = triggerline->stringargs[0] ? get_number(triggerline->stringargs[0]) : SKINCOLOR_NONE;
|
||||||
UINT16 color = (actor->player ? actor->player->powers[pw_dye] : actor->color);
|
UINT16 color = (actor->player ? actor->player->powers[pw_dye] : actor->color);
|
||||||
boolean invert = (triggerline->flags & ML_NOCLIMB ? true : false);
|
|
||||||
|
|
||||||
if (invert ^ (triggercolor != color))
|
if (!!(triggerline->args[1]) ^ (triggercolor != color))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -1855,8 +1852,8 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
||||||
|| (specialtype == 325 && triggerline->args[0]) // DeNightserize - Once
|
|| (specialtype == 325 && triggerline->args[0]) // DeNightserize - Once
|
||||||
|| (specialtype == 327 && triggerline->args[0]) // Nights lap - Once
|
|| (specialtype == 327 && triggerline->args[0]) // Nights lap - Once
|
||||||
|| (specialtype == 329 && triggerline->args[0]) // Nights Bonus Time - Once
|
|| (specialtype == 329 && triggerline->args[0]) // Nights Bonus Time - Once
|
||||||
|| (specialtype == 333 && triggerline->args[0] == TMT_ONCE) // Player skin
|
|| (specialtype == 331 && triggerline->args[0] == TMT_ONCE) // Player skin
|
||||||
|| specialtype == 336 // Dye - Once
|
|| (specialtype == 334 && triggerline->args[0] == TMT_ONCE) // Object dye
|
||||||
|| specialtype == 399) // Level Load
|
|| specialtype == 399) // Level Load
|
||||||
triggerline->special = 0; // Clear it out
|
triggerline->special = 0; // Clear it out
|
||||||
|
|
||||||
|
@ -1903,16 +1900,14 @@ void P_LinedefExecute(INT16 tag, mobj_t *actor, sector_t *caller)
|
||||||
|| lines[masterline].special == 314 // Number of pushables
|
|| lines[masterline].special == 314 // Number of pushables
|
||||||
|| lines[masterline].special == 317 // Condition set trigger
|
|| lines[masterline].special == 317 // Condition set trigger
|
||||||
|| lines[masterline].special == 319 // Unlockable trigger
|
|| lines[masterline].special == 319 // Unlockable trigger
|
||||||
|| lines[masterline].special == 331) // Player skin
|
|| lines[masterline].special == 331 // Player skin
|
||||||
|
|| lines[masterline].special == 334) // Object dye
|
||||||
&& lines[masterline].args[0] > TMT_EACHTIMEMASK)
|
&& lines[masterline].args[0] > TMT_EACHTIMEMASK)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (lines[masterline].special == 321 && lines[masterline].args[0] > TMXT_EACHTIMEMASK) // Trigger after X calls
|
if (lines[masterline].special == 321 && lines[masterline].args[0] > TMXT_EACHTIMEMASK) // Trigger after X calls
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (lines[masterline].special == 335) // Dye
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!P_RunTriggerLinedef(&lines[masterline], actor, caller))
|
if (!P_RunTriggerLinedef(&lines[masterline], actor, caller))
|
||||||
return; // cancel P_LinedefExecute if function returns false
|
return; // cancel P_LinedefExecute if function returns false
|
||||||
}
|
}
|
||||||
|
@ -6692,6 +6687,7 @@ void P_SpawnSpecials(boolean fromnetsave)
|
||||||
case 317: // Condition set trigger
|
case 317: // Condition set trigger
|
||||||
case 319: // Unlockable trigger
|
case 319: // Unlockable trigger
|
||||||
case 331: // Player skin
|
case 331: // Player skin
|
||||||
|
case 334: // Object dye
|
||||||
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;
|
||||||
|
@ -6719,11 +6715,6 @@ void P_SpawnSpecials(boolean fromnetsave)
|
||||||
P_AddEachTimeThinker(&lines[i], lines[i].args[0] == TMT_EACHTIMEENTERANDEXIT);
|
P_AddEachTimeThinker(&lines[i], lines[i].args[0] == TMT_EACHTIMEENTERANDEXIT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Each time executors
|
|
||||||
case 335:
|
|
||||||
P_AddEachTimeThinker(&lines[i], !!(lines[i].flags & ML_BOUNCY));
|
|
||||||
break;
|
|
||||||
|
|
||||||
// No More Enemies Linedef Exec
|
// No More Enemies Linedef Exec
|
||||||
case 313:
|
case 313:
|
||||||
P_AddNoEnemiesThinker(&lines[i]);
|
P_AddNoEnemiesThinker(&lines[i]);
|
||||||
|
@ -6743,11 +6734,6 @@ void P_SpawnSpecials(boolean fromnetsave)
|
||||||
case 329:
|
case 329:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Object dye executors
|
|
||||||
case 334:
|
|
||||||
case 336:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 399: // Linedef execute on map load
|
case 399: // Linedef execute on map load
|
||||||
// This is handled in P_RunLevelLoadExecutors.
|
// This is handled in P_RunLevelLoadExecutors.
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue