From 1bbf1b2887893405eea1bddb11dbf9a393a87111 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Mon, 20 Sep 2021 14:50:18 +0200 Subject: [PATCH] Adapt linedef type 438 to UDMF --- extras/conf/udb/Includes/SRB222_linedefs.cfg | 13 ++++++++++++- src/p_setup.c | 3 +++ src/p_spec.c | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index 27d8454dd..e6e26b579 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -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 { diff --git a/src/p_setup.c b/src/p_setup.c index 1476e1d43..0ea997eda 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -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; diff --git a/src/p_spec.c b/src/p_spec.c index 11a03056f..135670720 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -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<destscale = FixedDiv(line->args[0]<destscale < FRACUNIT/100) mo->destscale = FRACUNIT/100; if (mo->player && bot)