Adapt linedef type 438 to UDMF

This commit is contained in:
MascaraSnake 2021-09-20 14:50:18 +02:00
parent 3a73c6167c
commit 1bbf1b2887
3 changed files with 16 additions and 2 deletions

View file

@ -2955,6 +2955,17 @@ udmf
}
}
438
{
title = "Change Object Size";
prefix = "(438)";
arg0
{
title = "Size (%)";
default = 100;
}
}
460
{
title = "Award Rings";
@ -3191,7 +3202,7 @@ udmf
}
arg1
{
title = Effect";
title = "Effect";
type = 11;
enum
{

View file

@ -3824,6 +3824,9 @@ static void P_ConvertBinaryMap(void)
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
lines[i].args[1] = !!(lines[i].flags & ML_NOCLIMB);
break;
case 438: //Change object size
lines[i].args[0] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS;
break;
case 439: //Change tagged linedef's textures
lines[i].args[0] = tag;
lines[i].args[1] = TMSD_FRONTBACK;

View file

@ -2764,7 +2764,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
case 438: // Set player scale
if (mo)
{
mo->destscale = FixedDiv(P_AproxDistance(line->dx, line->dy), 100<<FRACBITS);
mo->destscale = FixedDiv(line->args[0]<<FRACBITS, 100<<FRACBITS);
if (mo->destscale < FRACUNIT/100)
mo->destscale = FRACUNIT/100;
if (mo->player && bot)