mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 05:41:42 +00:00
Adapt linedef types 317-320 to UDMF
This commit is contained in:
parent
f86dff8cf2
commit
9d87e97275
3 changed files with 52 additions and 16 deletions
|
@ -2575,6 +2575,38 @@ udmf
|
|||
}
|
||||
}
|
||||
|
||||
317
|
||||
{
|
||||
title = "Condition Set Trigger";
|
||||
prefix = "(317)";
|
||||
arg0
|
||||
{
|
||||
title = "Trigger type";
|
||||
type = 11;
|
||||
enum = "triggertype";
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Trigger ID";
|
||||
}
|
||||
}
|
||||
|
||||
319
|
||||
{
|
||||
title = "Unlockable";
|
||||
prefix = "(319)";
|
||||
arg0
|
||||
{
|
||||
title = "Trigger type";
|
||||
type = 11;
|
||||
enum = "triggertype";
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Unlockable ID";
|
||||
}
|
||||
}
|
||||
|
||||
323
|
||||
{
|
||||
title = "NiGHTSerize";
|
||||
|
|
|
@ -3752,6 +3752,18 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[2] = TMC_EQUAL;
|
||||
lines[i].special = 314;
|
||||
break;
|
||||
case 317: //Condition set trigger - Continuous
|
||||
case 318: //Condition set trigger - Once
|
||||
lines[i].args[0] = (lines[i].special == 318) ? TMT_ONCE : TMT_CONTINUOUS;
|
||||
lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||
lines[i].special = 317;
|
||||
break;
|
||||
case 319: //Unlockable trigger - Continuous
|
||||
case 320: //Unlockable trigger - Once
|
||||
lines[i].args[0] = (lines[i].special == 320) ? TMT_ONCE : TMT_CONTINUOUS;
|
||||
lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||
lines[i].special = 319;
|
||||
break;
|
||||
case 323: //NiGHTSerize - Each time
|
||||
case 324: //NiGHTSerize - Once
|
||||
case 325: //DeNiGHTSerize - Each time
|
||||
|
|
24
src/p_spec.c
24
src/p_spec.c
|
@ -1768,10 +1768,9 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
|||
if (!P_CheckPushables(triggerline, caller))
|
||||
return false;
|
||||
break;
|
||||
case 317: // continuous
|
||||
case 318: // once
|
||||
case 317:
|
||||
{ // Unlockable triggers required
|
||||
INT32 trigid = (INT32)(sides[triggerline->sidenum[0]].textureoffset>>FRACBITS);
|
||||
INT32 trigid = triggerline->args[1];
|
||||
|
||||
if ((modifiedgame && !savemoddata) || (netgame || multiplayer))
|
||||
return false;
|
||||
|
@ -1784,10 +1783,9 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
|||
return false;
|
||||
}
|
||||
break;
|
||||
case 319: // continuous
|
||||
case 320: // once
|
||||
case 319:
|
||||
{ // An unlockable itself must be unlocked!
|
||||
INT32 unlockid = (INT32)(sides[triggerline->sidenum[0]].textureoffset>>FRACBITS);
|
||||
INT32 unlockid = triggerline->args[1];
|
||||
|
||||
if ((modifiedgame && !savemoddata) || (netgame || multiplayer))
|
||||
return false;
|
||||
|
@ -1855,8 +1853,8 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
|||
|| specialtype == 308 // Race only - Once
|
||||
|| specialtype == 313 // No More Enemies - Once
|
||||
|| (specialtype == 314 && triggerline->args[0] == TMT_ONCE) // No of pushables
|
||||
|| specialtype == 318 // Unlockable trigger - Once
|
||||
|| specialtype == 320 // Unlockable - Once
|
||||
|| (specialtype == 317 && triggerline->args[0] == TMT_ONCE) // Unlockable trigger
|
||||
|| (specialtype == 319 && triggerline->args[0] == TMT_ONCE) // Unlockable
|
||||
|| specialtype == 321 || specialtype == 322 // Trigger on X calls - Continuous + Each Time
|
||||
|| (specialtype == 323 && triggerline->args[0]) // Nightserize - Once
|
||||
|| (specialtype == 325 && triggerline->args[0]) // DeNightserize - Once
|
||||
|
@ -6667,6 +6665,8 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
case 300: // Trigger linedef executor
|
||||
case 303: // Count rings
|
||||
case 314: // Pushable linedef executors (count # of pushables)
|
||||
case 317: // Condition set trigger
|
||||
case 319: // Unlockable trigger
|
||||
if (lines[i].args[0] > TMT_EACHTIMEMASK)
|
||||
P_AddEachTimeThinker(&lines[i], lines[i].args[0] == TMT_EACHTIMEENTERANDEXIT);
|
||||
break;
|
||||
|
@ -6702,14 +6702,6 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
P_AddNoEnemiesThinker(&lines[i]);
|
||||
break;
|
||||
|
||||
// Unlock trigger executors
|
||||
case 317:
|
||||
case 318:
|
||||
break;
|
||||
case 319:
|
||||
case 320:
|
||||
break;
|
||||
|
||||
// Trigger on X calls
|
||||
case 321:
|
||||
case 322:
|
||||
|
|
Loading…
Reference in a new issue