mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-18 01:51:39 +00:00
Adapt linedef type 457 to UDMF
This commit is contained in:
parent
d8b5cb6c90
commit
132f3f21f1
3 changed files with 49 additions and 9 deletions
|
@ -3083,6 +3083,43 @@ udmf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
457
|
||||||
|
{
|
||||||
|
title = "Track Object's Angle";
|
||||||
|
prefix = "(457)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "Anchor tag";
|
||||||
|
type = 14;
|
||||||
|
}
|
||||||
|
arg1
|
||||||
|
{
|
||||||
|
title = "Angle tolerance";
|
||||||
|
type = 8;
|
||||||
|
}
|
||||||
|
arg2
|
||||||
|
{
|
||||||
|
title = "Time tolerance";
|
||||||
|
}
|
||||||
|
arg3
|
||||||
|
{
|
||||||
|
title = "Trigger linedef tag";
|
||||||
|
type = 15;
|
||||||
|
}
|
||||||
|
arg4
|
||||||
|
{
|
||||||
|
title = "Track after failure?";
|
||||||
|
type = 11;
|
||||||
|
enum = "noyes";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
458
|
||||||
|
{
|
||||||
|
title = "Stop Tracking Object's Angle";
|
||||||
|
prefix = "(458)";
|
||||||
|
}
|
||||||
|
|
||||||
460
|
460
|
||||||
{
|
{
|
||||||
title = "Award Rings";
|
title = "Award Rings";
|
||||||
|
|
|
@ -4066,6 +4066,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 457: //Track object's angle
|
||||||
|
lines[i].args[0] = tag;
|
||||||
|
lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
|
lines[i].args[2] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||||
|
lines[i].args[3] = (lines[i].sidenum[1] != 0xffff) ? sides[lines[i].sidenum[1]].rowoffset >> FRACBITS : 0;
|
||||||
|
lines[i].args[4] = !!(lines[i].flags & ML_EFFECT2);
|
||||||
|
break;
|
||||||
case 459: //Control text prompt
|
case 459: //Control text prompt
|
||||||
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] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
lines[i].args[1] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS;
|
||||||
|
|
14
src/p_spec.c
14
src/p_spec.c
|
@ -3488,17 +3488,13 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
case 457: // Track mobj angle to point
|
case 457: // Track mobj angle to point
|
||||||
if (mo)
|
if (mo)
|
||||||
{
|
{
|
||||||
INT32 failureangle = FixedAngle((min(max(abs(sides[line->sidenum[0]].textureoffset>>FRACBITS), 0), 360))*FRACUNIT);
|
INT32 failureangle = FixedAngle((min(max(abs(line->args[1]), 0), 360))*FRACUNIT);
|
||||||
INT32 failuredelay = abs(sides[line->sidenum[0]].rowoffset>>FRACBITS);
|
INT32 failuredelay = abs(line->args[2]);
|
||||||
INT32 failureexectag = line->sidenum[1] != 0xffff ?
|
INT32 failureexectag = line->args[3];
|
||||||
(INT32)(sides[line->sidenum[1]].textureoffset>>FRACBITS) : 0;
|
boolean persist = !!(line->args[4]);
|
||||||
boolean persist = (line->flags & ML_EFFECT2);
|
|
||||||
mobj_t *anchormo;
|
mobj_t *anchormo;
|
||||||
|
|
||||||
if ((secnum = Tag_Iterate_Sectors(tag, 0)) < 0)
|
anchormo = P_FindObjectTypeFromTag(MT_ANGLEMAN, line->args[0]);
|
||||||
return;
|
|
||||||
|
|
||||||
anchormo = P_GetObjectTypeInSectorNum(MT_ANGLEMAN, secnum);
|
|
||||||
if (!anchormo)
|
if (!anchormo)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue